如何在$this->auth->authenticate()这样的调用中找到authenticate的位置?
想研究一下laravel auth的一些东西,找到了这样的一个文件,请问如何找到$this->auth->authenticate()中authenticate的定义地方呢?想看下代码
你这是哪个版本的框架?更新下框架再看吧?相关的
authenticate()
方法在Illuminate\Auth\GuardHelpers
中其中的
$this->user()
方法是指实现了Illuminate\Contracts\Auth\StatefulGuard
接口的几个类:Illuminate\Auth\RequestGuard
、Illuminate\Auth\SessionGuard
、Illuminate\Auth\TokenGuard
其中之一,具体是哪一个,是根据config/auth.php
中guards.web.driver
的值判断的。默认值是session
,那么对应的就是Illuminate\Auth\SessionGuard
中的user()
方法。