I have a routing problem with a laravel application.
I have the following route:
Route::get('home', array
('as' => 'home',
'uses' => 'HomeController@getHome'
));
which leads to the following url:
192.168.2.22/laravel/public/home
all is fine with this.
Then I have a second route like this:
Route::get('users/{id?}', function($id) {
$user = Users::find($id);
return View::make('Account.profile')->with('user', $user);
});
which leads to the following url:
192.168.2.22/laravel/public/users/1
Now when I click the Home link again from this page I get :
192.168.2.22/laravel/public/users/home
which of course gives me an error.
How can I fix this?