I have a basic login system setup, but I would like the user to be sent to there dashboard page if they try to access the "login" page or "create account" page.
How do I go about doing this?
I am thinking something in the routes file?:
Route::post('/login', array('uses' => 'UserController@login'));
Route::post('/create-account', array('uses' => 'UserController@createAccount'));
Route::group(array('before' => 'auth'), function () {
Route::get('/dashboard', array('uses' => 'DashboardController@index'));
Route::get('/logout', function () {
Auth::logout();
return Redirect::to('/start');
});
});
Perhaps some kind of group around the first two routes?