laravel/framework · error · InvalidArgumentException

Driver [ ] is not supported.

Error message

Driver [{$config['driver']}] is not supported.

What it means

Thrown by BroadcastManager::resolve() when a connection's config exists but its 'driver' value maps to no create{Driver}Driver method on the manager and no custom creator was registered via Broadcast::extend(). The driver is the concrete broadcaster strategy (pusher, ably, redis, log, null).

Solutions

  1. Use a built-in driver (pusher, ably, redis, log, null).
  2. Install and boot the package providing the driver (e.g. composer require laravel/reverb).
  3. Register the custom driver via Broadcast::extend('mydriver', fn (...) => new MyBroadcaster(...)).
  4. Correct the typo in the 'driver' key.
  5. Run php artisan config:clear.

Example fix

// before
'connections' => [
    'main' => ['driver' => 'mydriver', ...], // not registered
],

// after — register in a service provider boot()
Broadcast::extend('mydriver', function ($app, array $config) {
    return new \App\Broadcasting\MyBroadcaster($config);
});
// or use a built-in: 'driver' => 'pusher'
Defensive patterns

Strategy: validation

Validate before calling

// PHP — verify the driver is supported
$name = config('broadcasting.default');
$driver = config("broadcasting.connections.{$name}.driver");
$method = 'create' . ucfirst((string) $driver) . 'Driver';
$resolvable = in_array($driver, ['pusher','ably','redis','log','null'], true)
    || method_exists(app(\Illuminate\Broadcasting\BroadcastManager::class), $method);
if (! $resolvable) abort(500, "Broadcast driver [{$driver}] is not supported.");

Type guard

function broadcastDriverIsBuiltin(?string $driver): bool {
    return in_array($driver, ['pusher','ably','redis','log','null'], true);
}

Try / catch

try {
    Broadcast::driver($name);
} catch (\InvalidArgumentException $e) {
    report('Unsupported broadcast driver: '.$e->getMessage());
    throw $e;
}

Prevention

When it happens

Trigger: Declaring a broadcasting connection with a 'driver' that is not one of the built-ins and not registered via Broadcast::extend(); misspelling a driver ('pushe'); using a third-party broadcaster package that is not installed/booted.

Common situations: Referencing 'reverb'/'soketi' driver without the package installed; typo in the driver string; a custom broadcaster registered in a service provider that never runs (e.g. deferred provider); config cache from before the package was added.

Related errors


AI-assisted analysis of laravel/framework@e0f6eb3518 (2026-08-11). Data as JSON: /api/errors/7b45801ab92b339d. Report an issue: GitHub.

Appendix: source

Thrown at src/Illuminate/Broadcasting/BroadcastManager.php:313

     * @throws \InvalidArgumentException
     * @throws \RuntimeException
     */
    protected function resolve($name)
    {
        $config = $this->getConfig($name);

        if (is_null($config)) {
            throw new InvalidArgumentException("Broadcast connection [{$name}] is not defined.");
        }

        if (isset($this->customCreators[$config['driver']])) {
            return $this->callCustomCreator($config);
        }

        $driverMethod = 'create'.ucfirst($config['driver']).'Driver';

        if (! method_exists($this, $driverMethod)) {
            throw new InvalidArgumentException("Driver [{$config['driver']}] is not supported.");
        }

        try {
            return $this->{$driverMethod}($config);
        } catch (Throwable $e) {
            throw new RuntimeException("Failed to create broadcaster for connection \"{$name}\" with error: {$e->getMessage()}.", 0, $e);
        }
    }

    /**
     * Call a custom driver creator.
     *
     * @param  array  $config
     * @return mixed
     */
    protected function callCustomCreator(array $config)
    {
        return $this->customCreators[$config['driver']]($this->app, $config);

View on GitHub (pinned to e0f6eb3518)