Skip to content

Instantly share code, notes, and snippets.

@Maras0830
Created June 4, 2016 04:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Maras0830/998c75a8398056b508c288a28dfe2640 to your computer and use it in GitHub Desktop.
Save Maras0830/998c75a8398056b508c288a28dfe2640 to your computer and use it in GitHub Desktop.
EventServiceProvider using auth.login
<?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