Created
June 4, 2016 04:33
-
-
Save Maras0830/998c75a8398056b508c288a28dfe2640 to your computer and use it in GitHub Desktop.
EventServiceProvider using auth.login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; | |
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; | |
class EventServiceProvider extends ServiceProvider | |
{ | |
/** | |
* The event listener mappings for the application. | |
* | |
* @var array | |
*/ | |
protected $listen = [ | |
// 註冊登入監聽器 | |
'auth.login' => [ | |
'App\Handlers\Events\AuthLoginEventHandler', | |
], | |
]; | |
/** | |
* Register any other events for your application. | |
* | |
* @param \Illuminate\Contracts\Events\Dispatcher $events | |
* @return void | |
*/ | |
public function boot(DispatcherContract $events) | |
{ | |
parent::boot($events); | |
// | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment