Support the ongoing development of Laravel.io →
posted 10 years ago
Testing
Last updated 2 years ago.
0

Could you post the code of the controller ?

Last updated 2 years ago.
0
public function getAccountProfile() {
    return View::make('account/profile');
}
Last updated 2 years ago.
0

I've noticed, that redirect doesn't work when a user is logged in.

Last updated 2 years ago.
0

Should I put my routes to a group ? If so, can you tell me which should I use ?

Last updated 2 years ago.
0

Found the solution myself ! I have to put the routes for user in an authenticated group. That's my code:

 /*
  * Authenticated group
  */

Route::group(array('before' => 'auth'), function() {
    
    /*
     * Log out (GET)
     */
    
    Route::get('account/logout', array(
        'as' => 'get-account-logout',
        'uses' => 'AccountController@getAccountLogout'
    ));
    
    /*
     * Account dashboard - (GET)
     */
    
    Route::get('/account/profile', array(
        'as' => 'get-account-profile',
        'uses' => 'AccountController@getAccountProfile'
    ));
    
});
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

jacko1998 jacko1998 Joined 2 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.