如何在$this->auth->authenticate()这样的调用中找到authenticate的位置?
想研究一下laravel auth的一些东西,找到了这样的一个文件,请问如何找到$this->auth->authenticate()中authenticate的定义地方呢?想看下代码


关于 LearnKu
你这是哪个版本的框架?更新下框架再看吧?相关的
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()方法。