mardi 13 octobre 2015

Laravel redirect to route

I'm using Laravel 5.1 and wanted to know if there is a better way to do routing redirection.

Route::get('user/login', 'UserController@login');
Route::get('login', function() {
    return redirect()->to('user/login');
});

So basically, whenever a user goes to http://ift.tt/1dQYKGD, they will be redirect to http://ift.tt/1pKOC5N.

Is there a better way or other ways to do this or am I doing it correctly already? Thanks!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire