經過 composer 安裝 composer intervention/image
php
修改 config/app.php 文件,添加 $providers
和 $aliases
'Intervention\Image\ImageServiceProvider'git
'Image' => 'Intervention\Image\Facades\Image'github
By default Intervention Image uses PHP's GD library extension to process all images. If you want to switch to Imagick, you can pull a configuration file into your application by running on of the following artisan command.segmentfault
$ php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"app
In a Laravel application it is also possible to pass an uploaded file directly to the make method.composer
// resizing an uploaded file Image::make(Input::file('photo'))->resize(300, 200)->save('foo.jpg');
ORM-based file upload package for php. http://codesleeve.com https://github.com/CodeSleeve/stapleride