Inheritance: extends Event
Example #1
0
 public function onAuthSuccess(AuthenticateEvent $event)
 {
     if (!($credentials = $event->getCredentials()) or !isset($credentials['username'])) {
         return;
     }
     App::cache()->delete($this->getCacheKey($credentials['username']));
 }
 public function onFailure(AuthenticateEvent $event)
 {
     $credentials = $event->getCredentials();
     App::session()->set(Auth::LAST_USERNAME, $credentials['username']);
 }