没一个人回答,自己辛苦的找文档,说白了,就是通过这个可以把认证路由加到我们的路由中。
Now, all we have to do is add the authentication routes to our routes file. We can do this using the auth method on the Route facade, which will register all of the routes we need for registration, login, and password reset:
2 个回复
双子星 - Laravel群:9783891
赞同来自:
Now, all we have to do is add the authentication routes to our routes file. We can do this using the auth method on the Route facade, which will register all of the routes we need for registration, login, and password reset:
// Authentication Routes...
Route::auth();
tempchen
赞同来自:
public function auth()
{
// Authentication Routes...
$this->get('login', 'Auth\AuthController@showLoginForm');
$this->post('login', 'Auth\AuthController@login');
$this->get('logout', 'Auth\AuthController@logout');
// Registration Routes...
$this->get('register', 'Auth\AuthController@showRegistrationForm');
$this->post('register', 'Auth\AuthController@register');
// Password Reset Routes...
$this->get('password/reset/{token?}', 'Auth\PasswordController@showResetForm');
$this->post('password/email', 'Auth\PasswordController@sendResetLinkEmail');
$this->post('password/reset', 'Auth\PasswordController@reset');
}
这样就把关于注册登录退出重置密码的路由加进routes.php文件了