Nevermind. Working as it should - I must have goofed up a test somewhere along the line.
Thought I was going mad!!! My code works!
Another way to do this inside routes is using a route::group
Route::group(array('before' => 'auth'), function()
{
//ROUTES THAT REQUIRE USER TO BE LOGGED IN
Route::get('/protected_route', array('as'=>'protected', 'uses'=>'SomeController@someFunc'));
}
The nice thing about this is any route you put in the group will redirect the user to login automatically if they aren't authenticated.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community