I've yet to use this myself however have you set the event broadcasting up?
By default, the BroadCastServiceProvider is commented out in configure/app.
Make sure it's uncommented
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I've set it up with the database, and everything is inserted correctly there.
My Notification Class
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
class CommentedOnScreen extends Notification implements ShouldBroadcast
{
use Queueable;
protected $comment;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($comment)
{
$this->comment = $comment;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['database', 'broadcast'];
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
'from_user' => $this->comment['user_id'],
'dot_id' => $this->comment['dot_id'],
'comment' => $this->comment['comment'],
];
}
}
although when this is fired it gets sent to the database but not to pusher. Everything for pusher is setup in my .env file.
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_KEY'),
'secret' => env('PUSHER_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
],
],
BROADCAST_DRIVER="pusher"
PUSHER_KEY="public_key"
PUSHER_SECRET="secret_key"
PUSHER_APP_ID=app_id
and I am listening correctly with Laravel Echo, and thats being recorded on Pusher, but all my notifications etc are not received by pusher? Can anyone see something I am doing wrong?
Please or to participate in this conversation.