Just got "Getting Started with Laravel 4" ebook from Raphael Saunier and tried the tutorial, while writing the Route::get in routes.php i got an error saying that
Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException
When I wrote the code like this
Route::get('cats/{cat}', function($cat){
return View::make('cats.single')->with('cat', $cat);
});
Route::get('cats/create', function() {
$cat = new Cat;
return View::make('cats.edit')
->with('cat', $cat)
->with('method', 'post');
});
but after downloading the source file from packtpub, i cross check all the code are exactly the same, but only the sequence are different, like this
Route::get('cats/create', function() {
$cat = new Cat;
return View::make('cats.edit')
->with('cat', $cat)
->with('method', 'post');
});
Route::get('cats/{cat}', function($cat){
return View::make('cats.single')->with('cat', $cat);
});
does route sequence differences like this matter on routes.php? how can i now the error is from the route sequence?