Event handler does not accept Laravel event
I am working on L5.4 notification system. I created events and listeners. I have a test route to fire this event. The event completed successfully and I can even get it using it Pusher
in my views.
But for some reason I have to stop at handle(NewUser $event)
my method listener
. I tried dd($event)
But it never stops. Although I have logged events and subscriber display in mine EventServiceProvider
with listen
property
//App/Providers/EventServiceProvider.php
protected $listen = [
'App\Events\NewUser' => [
'App\Listeners\NewUserAdminNotification',
],
];
Actually, I want to store notification
in my database in this handle
listener method . But he never introduces this method.
Any pointer to problems would be greatly appreciated.
source to share