Route::auth();是什么用的?

5.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

赞同来自:

Route::auth()其实是调用Illuminate/Routing/Router类的auth方法:

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文件了

要回复问题请先登录注册