The code
:
Auth::routes();
its a shorcut for this collection of routes:
// Authentication Routes...
Route::get('login', 'AuthLoginController@showLoginForm')->name('login');
Route::post('login', 'AuthLoginController@login');
Route::post('logout', 'AuthLoginController@logout')->name('logout');
// Registration Routes...
Route::get('register', 'AuthRegisterController@showRegistrationForm')->name('register');
Route::post('register', 'AuthRegisterController@register');
// Password Reset Routes...
Route::get('password/reset', 'AuthForgotPasswordController@showLinkRequestForm')->name('password.request');
Route::post('password/email', 'AuthForgotPasswordController@sendResetLinkEmail')->name('password.email');
Route::get('password/reset/{token}', 'AuthResetPasswordController@showResetForm')->name('password.reset');
Route::post('password/reset', 'AuthResetPasswordController@reset');
So you can substitute the first with the list of routes and comment out any route you don't want in your application.
Edit for laravel version => 5.7
In newer versions you can add a parameter to the Auth::routes()
function call to disable the register routes:
Auth::routes(['register' => false]);
The email verification routes were added:
Route::get('email/verify', 'AuthVerificationController@show')->name('verification.notice');
Route::get('email/verify/{id}', 'AuthVerificationController@verify')->name('verification.verify');
Route::get('email/resend', 'AuthVerificationController@resend')->name('verification.resend');
BTW you can also disable Password Reset
and Email Verification
routes:
Auth::routes(['reset' => false, 'verify' => false]);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…