laravel 图片上传 intervention/image
1. composer require intervention/image
2). 修改 app/config/app.php
添加 ServiceProvider:
// 将下面代码添加到 providers 数组中
'providers' => [
// ...
Intervention\Image\ImageServiceProvider::class,
// ...
],
// 将下面代码添加到 aliases 数组中
'aliases' => [
// ...
'Image' => Intervention\Image\Facades\Image::class,
// ...
],
3 生成 config/image.php
配置文件:
php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"