网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

Laravel使用interventionimage包上传、剪裁图片

下面由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 5

$ php artisan vendor:publish --provider="Intervention\\Image\\ImageServiceProviderLaravel5"

Handling image uploads in Laravel

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')

分享名称:Laravel使用interventionimage包上传、剪裁图片
URL分享:http://bjjierui.cn/article/cjiiod.html

其他资讯