event->newStatus !== 'ready-for-pickup') { return []; } return ['mail']; } public function notifiable(): AnonymousNotifiable { $order = $this->event->order; $email = $order->billingAddress?->contact_email ?? $order->shippingAddress?->contact_email; return NotificationFacade::route('mail', $email); } public function toMail(object $notifiable): MailMessage { $order = $this->event->order; return (new MailMessage) ->subject(__('Your order :reference is ready for pickup', ['reference' => $order->reference])) ->view('core::order.notifications.pickup-ready', [ 'reference' => $order->reference, ]); } }