从品牌网站建设到网络营销策划,从策略到执行的一站式服务
下面由Laravel教程栏目给大家介绍Laravel 使用 intervention image 包上传、剪裁图片的方法,希望对需要的朋友有所帮助!
1、通过 composer 安装 composer intervention/image
2、修改 config/app.php 文件,添加 $providers
和 $aliases
'Intervention\\Image\\ImageServiceProvider'
'Image' => 'Intervention\\Image\\Facades\\Image'
1、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.
Publish configuration in Laravel 5Handling image uploads in Laravel$ php artisan vendor:publish --provider="Intervention\\Image\\ImageServiceProviderLaravel5"
In a Laravel application it is also possible to pass an uploaded file directly to the make method.
Creating Image from File Upload in Laravel// resizing an uploaded file Image::make(Input::file('photo'))->resize(300, 200)->save('foo.jpg')
成都网站建设公司地址:成都市青羊区太升南路288号锦天国际A座10层 建设咨询028-86922220
成都快上网科技有限公司-四川网站建设设计公司 | 蜀ICP备19037934号 Copyright 2020,ALL Rights Reserved cdkjz.cn | 成都网站建设 | © Copyright 2020版权所有.
专家团队为您提供成都网站建设,成都网站设计,成都品牌网站设计,成都营销型网站制作等服务,成都建网站就找快上网! | 成都网站建设哪家好? | 网站建设地图