F
Filamentβ€’4mo ago
binaryruel

Broadcasting and Ably

Nothing happens when I do
$admin = User::first();

Notification::make()
->title('Saved successfully')
->broadcast($admin);
$admin = User::first();

Notification::make()
->title('Saved successfully')
->broadcast($admin);
.env
BROADCAST_CONNECTION=ably
...
...
ABLY_KEY=first:last // my ably key
VITE_ABLY_PUBLIC_KEY=first // first part
ABLY_TOKEN_EXPIRY=21600
BROADCAST_CONNECTION=ably
...
...
ABLY_KEY=first:last // my ably key
VITE_ABLY_PUBLIC_KEY=first // first part
ABLY_TOKEN_EXPIRY=21600
echo.js
import Echo from 'laravel-echo';

import Pusher from 'pusher-js';
window.Pusher = Pusher;

window.Echo = new Echo({
broadcaster: 'pusher',
key: import.meta.env.VITE_ABLY_PUBLIC_KEY,
wsHost: 'realtime-pusher.ably.io',
wsPort: 443,
disableStats: true,
encrypted: true,
});
import Echo from 'laravel-echo';

import Pusher from 'pusher-js';
window.Pusher = Pusher;

window.Echo = new Echo({
broadcaster: 'pusher',
key: import.meta.env.VITE_ABLY_PUBLIC_KEY,
wsHost: 'realtime-pusher.ably.io',
wsPort: 443,
disableStats: true,
encrypted: true,
});
Even using Reverb on Laravel Herd.
2 Replies
ModestasV
ModestasVβ€’4mo ago
You need to publish Filament configuration file and add reverb settings there. Adding to echo.js does not compile it to the admin panel (unless you have a custom theme!) πŸ™‚
Want results from more Discord servers?
Add your server