vendredi 9 mars 2018

Laravel 5.4 NotificationSent vs MessageSending Events

I am a little confused about MessageSending and NotificationSent events. in my application, I want to save any notification and mail send by the app inside a database Table.

for that, I create two event listeners createNotificationLogOnSending and createNotificationLogOnSendingMessage.

1) createNotificationLogOnSending is fired when success notification is sent which means Illuminate\Notifications\Events\NotificationSent event is fired by laravel notification system.

2) createNotificationLogOnSendingMessage is fired when Illuminate\Mail\Events\MessageSending fired by laravel system.

the problem here, in the 2 use cases Illuminate\Mail\Events\MessageSending is fired which means createNotificationLogOnSendingMessage listener is listen to both Illuminate\Notifications\Events\NotificationSent and Illuminate\Mail\Events\MessageSending

i want to make each listener fired for its event.

any solution for this problem or it's laravel bug ?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2FnKZFN
via IFTTT

Aucun commentaire:

Enregistrer un commentaire