Getting the Event Dispatcher for Authentication


You want to access the event dispatcher used by authentication.


Use the Auth::getDispatcher() method.

$events = Auth::getDispatcher();


Usually you can just access the Event facade.

By default Laravel uses the same event driver for both the Event facade and the Auth facade. This means unless your application is explicitly setting the event dispatcher, it's easier to use the Event facade.

comments powered by Disqus