Voorkom dat /login het standaardpad voor inloggen is
Dankzij Stackoverflow. Ga naar je routes/web.php
En veranderen:
Auth::routes();
Naar binnen:
// Login Route::group(['middleware' => ['web']], function() { Route::get('login-new-address', ['as' => 'login', 'uses' => 'Auth\LoginController@showLoginForm']); Route::post('login-new-address', ['as' => 'login.post', 'uses' => 'Auth\LoginController@login']); Route::post('logout-new-address', ['as' => 'logout', 'uses' => 'Auth\LoginController@logout']); }); // Registration Routes... Route::get('register', ['as' => 'register', 'uses' => 'Auth\RegisterController@showRegistrationForm']); Route::post('register', ['as' => 'register.post', 'uses' => 'Auth\RegisterController@register']); // Password Reset Routes... Route::get('password/reset', ['as' => 'password.reset', 'uses' => 'Auth\ForgotPasswordController@showLinkRequestForm']); Route::post('password/email', ['as' => 'password.email', 'uses' => 'Auth\ForgotPasswordController@sendResetLinkEmail']); Route::get('password/reset/{token}', ['as' => 'password.reset.token', 'uses' => 'Auth\ResetPasswordController@showResetForm']); Route::post('password/reset', ['as' => 'password.reset.post', 'uses' => 'Auth\ResetPasswordController@reset']);
Wilt u de registratie blokkeren?
Remove the registration and password reset routes if you don’t want people to register, e.g. for admin panels.
Wijzig ook uw omleiding als u niet bent ingelogd
Wijzig in App/Exceptions/Handler.php de omleiding naar:
return redirect()->guest('login-new-address');