phuongnamsoft/laravel-admin-cropper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

phuongnamsoft/laravel-admin-cropper

Composer 安装命令:

composer require phuongnamsoft/laravel-admin-cropper

包简介

Integrate Cropper into laravel-admin

README 文档

README

This is a laravel-admin extension to integrate cropper into the form of laravel-admin

Installation

composer require laravel-admin-ext/cropper

Then...

php artisan vendor:publish --tag=laravel-admin-cropper

Configuration

In the extensions of the config/admin.php file, add some configuration belonging to this extension:

    'extensions' => [

        'cropper' => [
        
			// If you want to turn off this extension, set to false
            'enable' => true,
        ]
    ]

Usage:

Use it in form:

$form->cropper('content','label');

The default mode is free crop mode, if you need to force crop size, please use (note that this size is the final picture size not "scale")

$form->cropper('content','label')->cRatio($width,$height);

PS (feature read ahead)

  1. The picture is not pre-uploaded, but the input is input after the front end is converted to base64, and the server returns the image to save it.

  2. The picture format is saved by default. That is, if the original image is a png image with a transparent background, it will still be a png image with a transparent background after saving, and it will not be lost (front-end logo artifact)

  3. The extension can be called multiple times. Can be transferred multiple times in the same form without interfering with each other.

  4. Extend the ImageField and File classes of laravel-admin. So you don't have to worry about modifying and deleting pictures. They are all automatic. Of course, since the ImageField class is inherited, you can also use the various (crop, fit, insert) methods of "intervention/image" (Provided that you have composer require intervention/image)

License

Licensed under The MIT License (MIT).

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固