laravel 5.3 new Auth::routes()

后端 未结 10 1419
清歌不尽
清歌不尽 2020-12-04 05:26

Recently I start to use laravel 5.3 to write a blog, but I have a question after run php artisan make:auth

when I run this, it will generate routes in m

10条回答
  •  [愿得一人]
    2020-12-04 06:02

    function call order:

    1. (Auth)Illuminate\Support\Facades\Auth@routes (https://github.com/laravel/framework/blob/5.3/src/Illuminate/Support/Facades/Auth.php)
    2. (App)Illuminate\Foundation\Application@auth
    3. (Route)Illuminate\Routing\Router

    it's route like this:

    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');
    }
    

提交回复
热议问题