mark-villudo / image-upload
此软件包的最新版本(dev-master)没有可用的许可证信息。
Laravel 图片上传包 API
dev-master
2019-01-17 06:52 UTC
Requires
- php: >=7.0.0
- intervention/image: ^2.4
This package is auto-updated.
Last update: 2024-09-17 19:21:10 UTC
README
用于上传图片并自动生成多个尺寸的 Laravel 包
安装
使用 composer 安装此软件包。
composer require mark-villudo/image-upload
使用 - 生成多个尺寸
//Get file and declare path to store image
$file = $request->file('file');
$origFilePath = '/storage/categories';
//use helper to store images with multiple sizes
storeImages($file, $origFilePath);
使用 - 上传单个图片
//Get file and declare path to store image
$file = $request->file('file');
$origFilePath = '/storage/categories';
//use helper to store single image
storeSingleImage($file, $origFilePath);
鸣谢
Master Jes Dolfo.
Facebook Profile
<https://#/jesdolfo>
许可证
MIT 许可证(MIT)。有关更多信息,请参阅许可证文件。