2014-06-09 67 views
-2

這是我Laravel routes文件Laravel沒有調試

Route::get('d', function() 
{ 
    return View::make('hello'); 
}); 

我有調試設置爲true但是,當我瀏覽到localhost:8000,而非輸入localhost:8000/d,我得到了一個空白頁面,而不是不找到http異常。但是當我導航到localhost:8000/d時,一切正常。

請告訴我如何調試固定。

+0

不,不,我想要一個堆棧跟蹤,當我擊中了錯誤的路線 –

+0

你可能已經替換爲'd的'/'路徑'。並且主頁不應該拋出'http未找到異常',因爲Laravel是前端控制器模式,總是會發現首頁。 –

+0

然後像'/ foo'命中錯誤的路由,它將不起作用,您將看到調試消息。 –

回答

2

奇妙決定無論如何,只要重新安裝Laravel,這是我的終端數

[Mon Jun 9 19:13:27 2014] 127.0.0.1:48483 [200]: /favicon.ico 
[Mon Jun 9 19:13:50 2014] PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Could not find resource 'views/layout.html.php' in any resource paths.(searched: /home/nsnihalsahu/code/laravel/vendor/laravel/framework/src/Illuminate/Exception/resources, /var/www/working/laravel-master/vendor/filp/whoops/src/Whoops/Handler/../Resources)' in /home/nsnihalsahu/code/laravel/bootstrap/compiled.php:10631 
Stack trace: 
#0 /home/nsnihalsahu/code/laravel/bootstrap/compiled.php(10513): Whoops\Handler\PrettyPageHandler->getResource('views/layout.ht...') 
#1 /home/nsnihalsahu/code/laravel/bootstrap/compiled.php(10361): Whoops\Handler\PrettyPageHandler->handle(Object(RuntimeException)) 
#2 /home/nsnihalsahu/code/laravel/bootstrap/compiled.php(8837): Whoops\Run->handleException(Object(RuntimeException)) 
#3 /home/nsnihalsahu/code/laravel/bootstrap/compiled.php(8943): Illuminate\Exception\WhoopsDisplayer->display(Object(RuntimeException)) 
#4 /home/nsnihalsahu/code/laravel/bootstrap/compiled.php(8895): Illuminate\Exception\Handler->displayException(Object(R in /home/nsnihalsahu/code/laravel/bootstrap/compiled.php on line 10631 
[Mon Jun 9 19:13:50 2014] PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Could not find resource 'views/layout.html.php' in any resource paths.(searched: /home/nsnihalsahu/code/laravel/vendor/laravel/framework/src/Illuminate/Exception/resources, /var/www/working/laravel-master/vendor/filp/whoops/src/Whoops/Handler/../Resources)' in /home/nsnihalsahu/code/laravel/bootstrap/compiled.php:10631 
Stack trace: 
#0 /home/nsnihalsahu/code/laravel/bootstrap/compiled.php(10513): Whoops\Handler\PrettyPageHandler->getResource('views/layout.ht...') 
#1 /home/nsnihalsahu/code/laravel/bootstrap/compiled.php(10361): Whoops\Handler\PrettyPageHandler->handle(Object(Symfony\Component\Debug\Exception\FatalErrorException)) 
#2 /home/nsnihalsahu/code/laravel/bootstrap/compiled.php(8837): Whoops\Run->handleException(Object(Symfony\Component\Debug\Exception\FatalErrorException)) 
#3 /home/nsnihalsahu/code/laravel/bootstrap/compiled.php(8943): Illuminate\Exception\WhoopsDisplayer->display(Object(Symfony\Component\Debug\Exception\FatalErrorException)) 
#4 /home in /home/nsnihalsahu/code/laravel/bootstrap/compiled.php on line 10631 
[Mon Jun 9 19:13:50 2014] 127.0.0.1:48485 [200]: /favicon.ico 
[Mon Jun 9 19:13:50 2014] 127.0.0.1:48486 [200]: /favicon.ico 
[Mon Jun 9 19:19:27 2014] 127.0.0.1:48610 [200]: /favicon.ico 
[Mon Jun 9 19:19:27 2014] 127.0.0.1:48611 [200]: /favicon.ico 
[Mon Jun 9 19:19:29 2014] 127.0.0.1:48615 [200]: /favicon.ico 
[Mon Jun 9 19:19:29 2014] 127.0.0.1:48616 [200]: /favicon.ico 
[Mon Jun 9 19:19:32 2014] 127.0.0.1:48618 [200]: /favicon.ico 
[Mon Jun 9 19:19:32 2014] 127.0.0.1:48619 [200]: /favicon.ico 
^C