好吧,我剛剛開始檢查Laravel 4.1,我遇到了一個問題,我不明白爲什麼?問題是我在屏幕上看到這條消息「哎呀,看起來像是出了點問題。」但我沒有做任何事情。我創建了一個視圖,控制器和添加的路線,這是什麼是這些文件「哎呀,看起來像是出了點問題。」 Laravel 4.1
VIEW
<h1>Author's home page</h1>
控制器
class AuthorsController extends BaseController {
public $restful = true;
public function getIndex() {
return View::make('authors.index'); //authors.index because it's in the authors folder within the views folder
}
}
和ROUTE
Route::get('authors', '[email protected]');
因此,邏輯規定,當我轉到作者URL時,它應該在AurhorsController頁面中加載getIndex函數,並顯示在views> authors中的index.blade.php文件。
如果是這樣,那麼我不知道爲什麼這不起作用!任何幫助,將不勝感激。提前致謝。
編輯1
這是實際的錯誤
throw new NotFoundHttpException();
EDIT 2
'「哎呦,看起來像出事了。」'是所有錯誤頁面顯示的通用文本。你能否粘貼實際的錯誤信息(尋找例外)? –
@MarttiLaine我調試關閉,哎呀這是錯誤...拋出新的NotFoundHttpException(); – user3263978