laravel 5.3 new Auth::routes()

后端 未结 10 1453
清歌不尽
清歌不尽 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:15

    the loginuser class uses a trait called AuthenticatesUsers

    if you open that trait you will see the functions (this applies for other controllers) Illuminate\Foundation\Auth\AuthenticatesUsers;

    here is the trait code https://github.com/laravel/framework/blob/5.1/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php

    sorry for the bad format, im using my phone

    also Auth::routes() it just calls a function that returns the auth routes thats it (i think)

提交回复
热议问题