我习惯于在我的应用程序中发生错误时,橙色屏幕显示调试信息。我创建了一个用于我的网站的基本主布局模板,突然橙色错误页面不再显示。这真的很奇怪。关于如何解决这个问题的任何建议?
这是它现在看起来的样子..
共享支持的日志文件内容:
Next exception 'ErrorException' with message 'Route [signup] not defined. (View: /Applications/MAMP/htdocs/shopcon/app/views/general/index.blade.php)' in /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php:5512
Stack trace:
#0 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(9499): Illuminate\View\Engines\CompilerEngine->handleViewException(Object(InvalidArgumentException))
#1 /Applications/MAMP/htdocs/shopcon/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(56): Illuminate\View\Engines\PhpEngine->evaluatePath('/Applications/M...', Array)
#2 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(9375): Illuminate\View\Engines\CompilerEngine->get('/Applications/M...', Array)
#3 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(9362): Illuminate\View\View->getContents()
#4 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(9353): Illuminate\View\View->renderContents()
#5 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(10048): Illuminate\View\View->render()
#6 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(9583): Illuminate\Http\Response->setContent(Object(Illuminate\View\View))
#7 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(4832): Symfony\Component\HttpFoundation\Response->__construct(Object(Illuminate\View\View))
#8 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(4658): Illuminate\Routing\Router->prepareResponse(Object(Illuminate\Http\Request), Object(Illuminate\View\View))
#9 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(4644): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#10 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(698): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#11 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(679): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#12 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(1136): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#13 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(7219): Illuminate\Http\FrameGuard->handle(Object(Illuminate\Http\Request), 1, true)
#14 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(7816): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#15 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(7763): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#16 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(10771): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#17 /Applications/MAMP/htdocs/shopcon/bootstrap/compiled.php(640): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#18 /Applications/MAMP/htdocs/shopcon/public/index.php(49): Illuminate\Foundation\Application->run()
#19 /Applications/MAMP/htdocs/shopcon/index.php(19): require_once('/Applications/M...')
#20 {main} [] []
答案 0 :(得分:1)
您必须确保debug
文件中的true
设置为app/config/app.php
,如下所示:
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug'=>true,
如果设置了'debug'=>true
,那么您会看到橙色屏幕上的错误。
答案 1 :(得分:1)
请在debug'=>true
文件中添加app/config/app.php
return array(
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => true,