1

我想从 laravel 中删除一个包。我做了composer remove vendor/package

在我的开发中一切都很好,但是当我在生产中部署时出现了问题,我现在什么也做不了。

当我跑步时

php artisan package:discover

我得到

在 ProviderRepository.php 第 208 行:

找不到类“Laracasts\Flash\FlashServiceProvider”

我猜我这与某种缓存或 maby 配置有关

但我无法运行此命令,

php artisan config:clear

因为我收到与上面相同的错误消息。

PS。我正在使用 Laravel 5.6

4

2 回答 2

3

如果自动加载器文件在运行时查看这些缓存文件时被卡住,您可能需要清除它们php artisan config:clear,从而造成卡住。

删除以下文件,它们将重建: /bootstrap/cache/packages.php /bootstrap/cache/services.php

于 2018-09-17T14:20:33.303 回答
1

我解决了删除配置文件的问题,如下所示:

$rm bootstrap/cache/config.php

这个文件基本上是一个配置缓存,如果你想为你构建这个文件,只需运行以下工匠命令:

$php artisan config:cache
于 2018-09-18T02:03:59.390 回答