1
I am restricting the registration page only to be shown or accessed after the login.
A friend of the stackoverflow group told me that could be doing this way:
public function __construct()
{
$this->middleware('guest', ['except' => ['logout', 'register', 'showRegistrationForm']]);
$this->middleware('auth', ['only' => ['register', 'showRegistrationForm']]);
}
But this way when I login the system automatically directs me to page /register
and what I would like to be directing to the page /dashboard
With this the page Register 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');
});
Our guy thank you so much I did this way that you passed me got a much cleaner code and I believe it’s now 100%. Thank you so much for your help.
– Douglas Salomão
You’re welcome @Douglassalomão :) If you like, you can also leave a positive vote (http://meta.pt.stackoverflow.com/questions/2632/vote-hoje-vote-amanh%C3%A3-vote-always-vote-conscious)
– gmsantos