I am restricting the laravel registration page only to be shown or accessed after the login.
A friend of the stackoverflow group told me they could be doing it this way:
public function __construct()
{
$this->middleware('guest', ['except' => ['logout', 'register', 'showRegistrationForm']]);
$this->middleware('auth', ['only' => ['register', 'showRegistrationForm']]);
}
But this way when I log in the system automatically directs me to page /register
and what I would like would be to be directing to the page /dashboard
With this the register page would be accessed only if I clicked on the link referring to it.
My routes:
Route::group(['middleware' => ['web']], function () {
Route::get('/', 'Auth\AuthController@getLogin');
});
Route::group(['middleware' => 'web'], function () {
Route::Auth();
Route::get('/dashboard', 'HomeController@index');
});