Critycal's avatar

Class Pusher not found

So I'm using lumen.

I registered my BroadcastManager like this.

// bootstrap/app.php

$app->singleton(
    Illuminate\Broadcasting\BroadcastManager::class,
    Illuminate\Contracts\Broadcasting\Broadcaster::class,
    Illuminate\Broadcasting\BroadcastManager::class
);

$app->configure('broadcasting');

// config/broadcasting.php

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Default Broadcaster
    |--------------------------------------------------------------------------
    |
    | This option controls the default broadcaster that will be used by the
    | framework when an event needs to be broadcast. You may set this to
    | any of the connections defined in the "connections" array below.
    |
    */

    'default' => env('BROADCAST_DRIVER', 'redis'),

    /*
    |--------------------------------------------------------------------------
    | Broadcast Connections
    |--------------------------------------------------------------------------
    |
    | Here you may define all of the broadcast connections that will be used
    | to broadcast events to other systems or over websockets. Samples of
    | each available type of connection are provided inside this array.
    |
    */

    'connections' => [
        'redis' => [
            'driver' => 'redis',
            'connection' => env('BROADCAST_REDIS_CONNECTION', 'default'),
        ]

    ],

];

However all fails with this message in the failed_jobs table:

Class 'Pusher' not found in /var/www/vendor/illuminate/broadcasting/BroadcastManager.php:216

Don't get me wrong, I don't need to install Pusher I just want Laravel not to use pusher at all.

Why is this happening?

0 likes
5 replies
Critycal's avatar

I don't want to use Pusher, I want to use redis

rin4ik's avatar

what's your broadcast driver in env file?

BROADCAST_DRIVER=redis
rin4ik's avatar

@Critycal I understand that u don't want to use pusher , but in config/app.php add this line to aliases

'Pusher' => Pusher\Pusher::class,

error exists ? remove vendor folder and run composer install --no-scripts

Critycal's avatar

I'm on Lumen, do you know how to add Aliases there?

Please or to participate in this conversation.