我正在使用laravel 9队列通知。我想看看这些电子邮件是否发送成功。我已经阅读并执行了laravel文档通知事件。
https://laravel.com/docs/9.x/notifications#notification-events但是当我运行我的代码时,laravel没有进入事件/侦听器。我想我做错了什么,但我不知道是什么!?
通知命令
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);
}我希望你能帮我。提前感谢
发布于 2022-06-03 09:55:57
我忘了运行php手工队列:work
https://stackoverflow.com/questions/72487247
复制相似问题