Is there a way to get the name of an event that is firing when you're using a wild card listener?
I'm using the following listener:
Event::listen('sentinel.user.login', function (){
$userLog = new UserLog;
$logData = array('eventDescription' => "User login.");
$userLog->submitLog($logData);
});
I would like to alter it to catch any event fired from the sentinel user name with a wild car like so:
'sentinel.user.*'
And then use the particular event that fired as the value for eventDescription
:
$logData = array ('eventDescription' => $eventName);
I read through the documentation and API and can't find how I would go about doing this, but it seems like there has to be some way to.
Could anyone point me in the right direction?
Thanks
Nevermind, a user on stackoverflow pointed me to Event::firing()
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community