Auth::routes();
- это набор маршрутов. К которым относятся маршруты:
// Authentication Routes
$this->get('login', 'Auth\LoginController@showLoginForm')->name('login');
$this->post('login', 'Auth\LoginController@login');
$this->post('logout', 'Auth\LoginController@logout')->name('logout');
// Registration Routes
$this->get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
$this->post('register', 'Auth\RegisterController@register');
// Password Reset Routes
$this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm');
$this->post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail');
$this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm');
$this->post('password/reset', 'Auth\ResetPasswordController@reset');
Если вы хотите внести изменения в файлы аутентификации по умолчанию, вы можете. Вы найдете все контроллеры в каталоге Controllers / Auth и блейд-файлы в каталоге resources / Auth.
Если вам все еще сложно. Вместо внесения изменений в Laravel auth! Вы можете просто удалить Auth::routes();
с маршрутов / сети. php и создать свой собственный.
Вот пример:
// Authentication Routes...
$this->get('login', 'LoginController@showLoginForm')->name('login');
$this->post('login', 'LoginController@login');
$this->post('logout', 'LoginController@logout')->name('logout');
// Registration Routes
$this->get('register', 'RegisterController@showRegistrationForm')->name('register');
$this->post('register', 'RegisterController@register');
// Password Reset Routes
$this->get('password/reset', 'ForgotPasswordController@showLinkRequestForm');
$this->post('password/email', 'ForgotPasswordController@sendResetLinkEmail');
$this->get('password/reset/{token}', 'ResetPasswordController@showResetForm');
$this->post('password/reset', 'ResetPasswordController@reset');