Laravel 5 Excel 安装失败

Laravel 5 Excel installation failure

我在尝试将 Laravel Excel (http://www.maatwebsite.nl/laravel-excel/docs) 软件包安装到我的 Laravel 5 时遇到了困难。这是我到目前为止所做的:

这是问题所在 - 当我尝试 运行ning php artisan vendor:publish 时,它告诉我 Nothing to publish for tag [].

当我使用 php artisan tinker 和 运行 $excel = App::make('excel') 时,它告诉我 ReflectionException with message 'Class excel does not exist'

我做错了什么?

我遇到了同样的问题,来到这个问题,但没有任何明确的解决方案。所以我一直在寻找并找到了一个简单的解决方案。

问题与缓存的配置文件有关。所以对于Laravel 5.1,只需清除缓存

php artisan config:cache

在我的案例中效果很好。 Source