I have a Laravel 5 application with multiple authentication guards.
I created a Illuminate\Auth\Events\Login
event listener which handles the login event but I can't come up with a way to only handle the event for a specific authentication guard.
I have a Laravel 5 application with multiple authentication guards.
I created a Illuminate\Auth\Events\Login
event listener which handles the login event but I can't come up with a way to only handle the event for a specific authentication guard.
You can check in your listener if the user is logged via that specific guard. If true, do your normal stuff.
if(Auth::guard('web')->check()){
// Do normal stuff
}else {
// If you want an else.
}