最近开始使用laravel 5.3写博客,但是运行后出现一个问题php artisan make:auth
当我运行这个时,它会在我的web.php
这是其中的代码:
Auth::routes();
Route::get('/home', 'HomeController@index');
然后我跑php artisan route:list
,我发现很多操作,例如 LoginController@login...
但我在我的中没有找到这些动作App\Http\Controllers\Auth
,这些在哪里?
还有什么是Auth::routes()
代表,我找不到关于Auth的路线。
我需要有人帮助,谢谢您回答我的问题
Auth::routes()
只是一个帮助程序类,可帮助您生成用户身份验证所需的所有路由。您可以在这里浏览代码https://github.com/laravel/framework/blob/5.3/src/Illuminate/Routing/Router.php https://github.com/laravel/framework/blob/5.3/src/Illuminate/Routing/Router.php反而。
以下是路线
// 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');
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)