I am using laravel 9 queue notification. I want to see if the emails are sent successfully or not. I have read and executed the laravel documentation notification events
https://laravel.com/docs/9.x/notifications#notification-events
but when I run my code, laravel is not getting into the event/listener. I think I'm doing something wrong but I don't know what!?
Notification Command
foreach ($this->emails as $email)
{
Notification::route('mail', $email)->notify(new OrderConfirmationNotification());
}
EventServiceProvider.php
protected $listen = [
NotificationSending::class => [
CheckNotificationStatus::class,
],
NotificationSent::class => [
LogNotification::class
]
];
CheckNotificationStatus.php
public function __construct() {}
public function handle(NotificationSending $event)
{
dd($event);
}
LogNotification.php
public function __construct()
{}
public function handle(NotificationSent $event)
{
dd($event);
}
I hope you can help me with it. thanks in advance