登录时为什么不需要指定 guard 看守
在登录时课程直接用了 Auth::attempt($credentials) 这样的方式登录,在这里我们为什么不需要指定看守?还是因为默认的就是 web 看守所以可以直接用.
指定看守对于项目的扩展会不会更好些?类似这样
Auth::guard()->attempt()
进行登录认证.
关于 LearnKu
默认 web 看守
参考一下:
https://segmentfault.com/a/119000000771636...
guard()methodIlluminate/Auth/AuthManager.php
config/auth.php
@sunnylin @Kevinvinvin 谢谢两位的回答,非常感谢.:smile: