Support the ongoing development of Laravel.io →
Requests Input

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

Last updated 3 years ago.
0

Nevermind, a user on stackoverflow pointed me to Event::firing()

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.