我使用Auth::routes();
在我的web.php
进行路由验证。
Defoult路由规则位于.../vendor/laravel/framework/src/Illuminate/Routing/Router.php
,如下所示:
public function auth()
{
// 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');
}
我需要覆盖此规则,例如:
$this->get('/admin/password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm');
$this->post('/admin/password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail');
但我不想改变供应商的任何东西。