Search code examples
laravelpusher

Pusher error: 404 NOT FOUND when using laravel


I'm using laravel 9 and I'm trying to get my localhost to use pusher, but when I test I get Pusher error: 404 NOT FOUND in my logs. this is a portion of the stack trace

[2022-09-02 14:22:38] local.ERROR: Pusher error: 404 NOT FOUND . {"exception":"[object] (Illuminate\Broadcasting\BroadcastException(code: 0): Pusher error: 404 NOT FOUND . at /var/www/html/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php:164)


Solution

  • Setting broadcast is not enough to create an integration.

    In first step install pusher: composer require pusher/pusher-php-server

    And after that, try run this command: php artisan config:cache

    Source: https://pusher.com/tutorials/web-notifications-laravel-pusher-channels/