laravel fire
*/
public function logout()
{
$user = $this->user();
// If we have an event dispatcher instance, we can fire off the logout event
// so any further processing can be done. This allows the developer to be
// listening for anytime a user signs out of this application manually.
$this->clearUserDataFromStorage();
if ( ! is_null($this->user))
{
$this->refreshRememberToken($user);
}
if (isset($this->events))
{
$this->events->fire('auth.logout', [$user]);
}
// Once we have fired the logout event we will clear the users out of memory
// so they are no longer available as the user is no longer considered as
// being signed into this application and should not be available here.
$this->user = null;
$this->loggedOut = true;
}
这里面的$this->events->fire('auth.logout', [$user]); auth.lgout对应的什么
0 个回复