laravel 安装excel

一、安装
1、composer require maatwebsite/excel ~2.0.0
2、在项目下composer.json中require里添加"maatwebsite/excel":"~2.0.0",并运行composer update 加载该包
二、配置
1、在config/app.php中注册服务提供者到providers数组:Maatwebsite\Excel\ExcelServiceProvider::class,
2、在config/app.php中注册门面到aliases数组  'Excel' => Maatwebsite\Excel\Facades\Excel::class,
3、更多配置php artisan vendor:publish;执行成功会在config目录下生成一个配置文件excel.php。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章