【发布时间】:2019-03-03 22:03:11
【问题描述】:
我尝试将我的 Laravel 从 5.4 更新到 5.5,但我遇到了一些错误-
未捕获的错误:调用未定义的方法 Whoops\Handler\PrettyPageHandler::setApplicationPaths() in...
Laravel 日志显示类似这样的内容-
production.ERROR: Class 'str' not found {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(代码:0): 找不到类“str” C:\xampp\htdocs\teste\config\cache.php:91) [堆栈跟踪]
production.ERROR: Class 'str' not found {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(代码:0): 找不到类“str” C:\xampp\htdocs\teste\config\cache.php:91) [堆栈跟踪]
这就是我的 cache.php 的样子-
'prefix' => env(
'CACHE_PREFIX',
str::slug(env('APP_NAME', 'laravel'), '_').'_cache'
),
第 91 行是 str::slug。知道我错过了什么吗?
【问题讨论】:
-
您是否按照官方的升级指南进行操作? laravel.com/docs/5.5/upgrade#upgrade-5.5.0
-
是的,先生。还有 youtube 上的教程,我仍然想念这个:$
-
你跑
composer update了吗? -
是的,我有,现在我尝试清理缓存,例如,在缓存行 91 class str not found 中给出错误
-
请尝试将
str::slug更改为str_slug