mro/thumbnail
Composer 安装命令:
composer require mro/thumbnail
包简介
This Package Use To Create Thumbnail Image in Laravel (Writer:MohammadRezaOrdooni)
README 文档
README
Thumbnail Can Use To Create Image Thumbnail In Laravel.
Installation
composer require mro/thumbnail
Add the following code to providers in config/app.php
Mro\Thumbnail\ThumbnailServiceProvider::class,
Add the following code to aliases in config/app.php
'Thumbnail'=>Mro\Thumbnail\ThumbnailFacade::class,
Usage
public function store(Request $request) { # create function arguments: create($_FILES['image'],$quality,$newWidth,newHeight); # the defaults are $quality=100 & $newWidth=300 & newHeight=300. # Images will be upload in "public/uploads/thumbnails/" directory. $image=\Thumbnail::create($request->image,100,200,200); Post::create([ 'image'=>$image, ]); }
Contributing
I hope that will be usefull for you.
License
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2022-07-25