© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Quadrubo

Livewire websockets on page

Does anyone know what I'm doing wrong here? The function is not getting called.

<?php

namespace App\Filament\Pages;

// ...

class WakeComputers extends Page
{
    // ...

    protected $listeners = ['echo-private:computers,ComputerReachableStatusUpdated' => 'notifyNewOrder'];

    public function notifyNewOrder()
    {
        dd("notify new order");
    }

    // ...
}
<?php

namespace App\Filament\Pages;

// ...

class WakeComputers extends Page
{
    // ...

    protected $listeners = ['echo-private:computers,ComputerReachableStatusUpdated' => 'notifyNewOrder'];

    public function notifyNewOrder()
    {
        dd("notify new order");
    }

    // ...
}


I even tried enabling broadcasting in the
config/filament.php
config/filament.php
.
// ...
    'broadcasting' => [
        'echo' => [
            'broadcaster' => 'pusher',
            'key' => env('VITE_PUSHER_APP_KEY'),
            'cluster' => env('VITE_PUSHER_APP_CLUSTER', 'mt1'),
            'wsHost' => env('VITE_PUSHER_HOST'),
            'wsPort' => env('VITE_PUSHER_PORT', 80),
            'wssPort' => env('VITE_PUSHER_PORT', 443),
            'forceTLS' => env('VITE_PUSHER_SCHEME', 'https') === 'https',
        ],
    ],
// ...
// ...
    'broadcasting' => [
        'echo' => [
            'broadcaster' => 'pusher',
            'key' => env('VITE_PUSHER_APP_KEY'),
            'cluster' => env('VITE_PUSHER_APP_CLUSTER', 'mt1'),
            'wsHost' => env('VITE_PUSHER_HOST'),
            'wsPort' => env('VITE_PUSHER_PORT', 80),
            'wssPort' => env('VITE_PUSHER_PORT', 443),
            'forceTLS' => env('VITE_PUSHER_SCHEME', 'https') === 'https',
        ],
    ],
// ...


Event is sent here:

    /**
     * Get the channels the event should broadcast on.
     *
     * @return \Illuminate\Broadcasting\Channel|array
     */
    public function broadcastOn()
    {
        return new PrivateChannel('computers');
    }
    /**
     * Get the channels the event should broadcast on.
     *
     * @return \Illuminate\Broadcasting\Channel|array
     */
    public function broadcastOn()
    {
        return new PrivateChannel('computers');
    }


Old javascript frontend could receive it:

Echo.private(`computers`).listen('ComputerReachableStatusUpdated', (e) => {
    // ...
});
Echo.private(`computers`).listen('ComputerReachableStatusUpdated', (e) => {
    // ...
});
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Livewire custom page
FilamentFFilament / ❓┊help
3y ago
filtering on a page livewire 3
FilamentFFilament / ❓┊help
2y ago
CheckboxList Issue on Custom Livewire page
FilamentFFilament / ❓┊help
2y ago
multiple filtersForm on a custom Livewire page
FilamentFFilament / ❓┊help
14mo ago