Live notifications

Im a little confused how notifications are working. So I've setup and installed pusher and echo etc. This is my notification
$message = $e->getMessage();
Notification::make()
->title('Translation failed')
->body($message)
->broadcast($this->initiator);
$message = $e->getMessage();
Notification::make()
->title('Translation failed')
->body($message)
->broadcast($this->initiator);
I have a queue:listen going, I can see the BroadcastNotificationCreated event, I can see in my pusher dashboard, the channel message come through and tells me the format is filament etc. But no notification comes through while im on my admin panel. What am I missing?
1 Reply
Jamie Cee
Jamie CeeOP7mo ago
Ill note that $this->initiator is set to the auth user In my bootstrap.js
var channel = Echo.channel(`offer`);
channel.listen('.translations', function (data) {
console.log(JSON.stringify(data));
alert(JSON.stringify(data));
});
var channel = Echo.channel(`offer`);
channel.listen('.translations', function (data) {
console.log(JSON.stringify(data));
alert(JSON.stringify(data));
});
But running the event, I dont see anything from the console.log. COnfused to what Im missing? Update: I've now found theres a filament.php config, and inside has
'broadcasting' => [

'echo' => [
'broadcaster' => 'pusher',
'key' => env('VITE_PUSHER_APP_KEY'),
'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
'wsHost' => env('VITE_PUSHER_HOST'),
'wsPort' => env('VITE_PUSHER_PORT'),
'wssPort' => env('VITE_PUSHER_PORT'),
'authEndpoint' => '/api/v1/broadcasting/auth',
'disableStats' => true,
'encrypted' => true,
'forceTLS' => true,
],

],
'broadcasting' => [

'echo' => [
'broadcaster' => 'pusher',
'key' => env('VITE_PUSHER_APP_KEY'),
'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
'wsHost' => env('VITE_PUSHER_HOST'),
'wsPort' => env('VITE_PUSHER_PORT'),
'wssPort' => env('VITE_PUSHER_PORT'),
'authEndpoint' => '/api/v1/broadcasting/auth',
'disableStats' => true,
'encrypted' => true,
'forceTLS' => true,
],

],
But in my network, broadcasting/auth isn't an endpoint, is there an extra step im supposed to do?
Want results from more Discord servers?
Add your server