我在尝试将Laravel Excel (http://www.maatwebsite.nl/laravel-excel/docs)包安装到我的Laravel 5上遇到了困难。目前为止,我已经完成了以下步骤:
- 将
"maatwebsite/excel": "2.*"
添加到我的require中,composer update
运行正常,我也拥有了所有的包文件 - 将
'Maatwebsite\Excel\ExcelServiceProvider'
添加到providers数组中 - 将
'Excel' => 'Maatwebsite\Excel\Facades\Excel'
添加到aliases数组中
php artisan vendor:publish
时,它告诉我Nothing to publish for tag [].
当我使用php artisan tinker
并运行$excel = App::make('excel')
时,它告诉我ReflectionException with message 'Class excel does not exist'
。我做错了什么?
composer dumpautoload
然后再次发布吗? - lesssugarartisan vendor:publish --tag=config
。 - NaN没有要发布的 [config] 标签内容。
- Salkz/vendor/maatwebsite/excel/src/config/excel.php
吗?如果有,只需将该文件复制到您的配置目录中,因为这就是发布命令所做的全部。 - NaN