onQueue(config('restaurant-delivery.queue.queues.notifications', 'restaurant-delivery-notifications')); } /** * Execute the job. */ public function handle(FirebaseService $firebase): void { try { $firebase->sendPushNotification( $this->token, $this->title, $this->body, $this->data ); Log::info('Push notification sent', [ 'title' => $this->title, 'data' => $this->data, ]); } catch (\Exception $e) { Log::error('Failed to send push notification', [ 'title' => $this->title, 'error' => $e->getMessage(), ]); throw $e; } } /** * Handle a job failure. */ public function failed(\Throwable $exception): void { Log::error('Push notification job failed permanently', [ 'title' => $this->title, 'error' => $exception->getMessage(), ]); } }