![](/img/trans.png)
[英]Laravel 5.1.11 Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist'
[英]Fatal error: Uncaught exception 'ReflectionException'
運行php代碼時,我得到了類似的錯誤( 未捕獲的異常'ReflectionException' )。 但是我沒有運氣來修復它。
Uncaught exception 'ReflectionException' with message 'Class path.base does not exist' in /home/localblu/staging/vendor/laravel/framework/src/Illuminate/Container/Container.php:504 Stack trace:
#0 /home/localblu/staging/vendor/laravel/framework/src/Illuminate/Container/Container.php(504): ReflectionClass->__construct('path.base')
#1 /home/localblu/staging/vendor/laravel/framework/src/Illuminate/Container/Container.php(428): Illuminate\Container\Container->build('path.base', Array)
#2 /home/localblu/staging/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(462): Illuminate\Container\Container->make('path.base', Array)
#3 /home/localblu/staging/vendor/laravel/framework/src/Illuminate/Container/Container.php(806): Illuminate\Foundation\Application->make('path.base')
#4 /home/localblu/staging/bootstrap/start.php(11): Illuminate\Container\Container->offsetGet('path.base')
#5 /home/localblu/staging/public/index.php(35): require_once('/home/localblu/...')
#6 {main} thrown in /home/localblu/staging/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 504
這是我的composer.json文件:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "4.2.*",
"phpunit/phpunit": "3.7.*",
"davejamesmiller/laravel-breadcrumbs": "~2.3"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}
你能幫幫我嗎?
跑
composer dump-autoload
正如評論中提到的那樣
composer dump-autoload -o
這解決了我的問題
在Laravel項目文件夾中,轉到app/Exceptions/Handler.php
,請注釋行app('sneaker')->captureException($exception);
然后,您將得到確切的錯誤,然后解決錯誤
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.