Skip to content

Commit

Permalink
create eventListener for user login event
Browse files Browse the repository at this point in the history
  • Loading branch information
adjust-fuchigami committed Nov 2, 2017
1 parent 8d16c69 commit 8c68512
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
29 changes: 29 additions & 0 deletions app/Listeners/LoginSuccess.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace App\Listeners;

use Illuminate\Auth\Events\Login as LoginEvent;

class LoginSuccess
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}

/**
* Handle the event.
*
* @param KernelBootstrapped $event
* @return void
*/
public function handle(LoginEvent $event)
{
}

}
6 changes: 3 additions & 3 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class EventServiceProvider extends ServiceProvider
* @var array
*/
protected $listen = [
'App\Events\Event' => [
'App\Listeners\EventListener',
],
'Illuminate\Auth\Events\Login' => [
'App\Listeners\LoginSuccess',
],
];

/**
Expand Down

0 comments on commit 8c68512

Please sign in to comment.