I added the following routes in routes.php
:
Route::get('/', function () {
return 'Hello World';
});
Route::get('user/{id}', function ($id) {
return 'User '.$id;
});
Route::post('foo/bar', function () {
return 'Hello World';
});
Route::put('foo/bar', function () {
//
});
Route::delete('foo/bar', function () {
//
});
And I am getting this error when I browse to /laravel/user/5/
Sorry, the page you are looking for could not be found.
NotFoundHttpException in RouteCollection.php line 161:1) in RouteCollection.php line 161.2) at RouteCollection-match(object(Request)) in Router.php line 533 at Router-findRoute(object(Request)) in Router.php line 512.
and a bunch of other errors.
Is anything wrong in my route configuration?