FilamentF
Filament2y ago
Veur

Broadcasted Notifications are completed in Horizon, but not received by Reverb

I've installed and configured Laravel Reverb & Echo. It all works fine with traditional Laravel notification classes:
    public function toBroadcast(object $notifiable): BroadcastMessage
    {
        $data = [
            'order_id' => $this->order->id,
            'amount' => 123,
        ];
        
        return (new BroadcastMessage($data))->onConnection('sync');
    }


But when I try to send a Filament Notification, it doesn't work. The jobs are handled by the queue, but nothing happens in Reverb:
    public function toBroadcast(object $notifiable): BroadcastMessage
    {
        return \Filament\Notifications\Notification::make()
            ->title('Saved successfully')
            ->getBroadcastMessage();
    }


The Notification is sent using:
$user->notify(new OrderCreatedNotification($order));

I attached some screenshots to add more context:
  • The completed job BroadcastNotificationCreated after broadcasting the Filament Notification
  • The websocket connection from Chrome dev tools
Schermafbeelding_2024-07-09_om_13.52.02.png
Schermafbeelding_2024-07-09_om_13.54.12.png
Was this page helpful?