{"record":{"id":"58542fda48d5be93","repo":"laravel/framework","slug":"driver-driver-is-not-supported","errorCode":null,"errorMessage":"Driver [{$driver}] is not supported.","messagePattern":"Driver \\[(.+?)\\] is not supported\\.","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Illuminate/Filesystem/FilesystemManager.php","lineNumber":155,"sourceCode":"     */\n    protected function resolve($name, $config = null)\n    {\n        $config ??= $this->getConfig($name);\n\n        if (empty($config['driver'])) {\n            throw new InvalidArgumentException(\"Disk [{$name}] does not have a configured driver.\");\n        }\n\n        $driver = $config['driver'];\n\n        if (isset($this->customCreators[$driver])) {\n            return $this->callCustomCreator($config);\n        }\n\n        $driverMethod = 'create'.ucfirst($driver).'Driver';\n\n        if (! method_exists($this, $driverMethod)) {\n            throw new InvalidArgumentException(\"Driver [{$driver}] is not supported.\");\n        }\n\n        return $this->{$driverMethod}($config, $name);\n    }\n\n    /**\n     * Call a custom driver creator.\n     *\n     * @param  array  $config\n     * @return \\Illuminate\\Contracts\\Filesystem\\Filesystem\n     */\n    protected function callCustomCreator(array $config)\n    {\n        return $this->customCreators[$config['driver']]($this->app, $config);\n    }\n\n    /**\n     * Create an instance of the local driver.","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/laravel/framework/blob/e0f6eb3518ac29fbbca8529e97d0df7fc9f24481/src/Illuminate/Filesystem/FilesystemManager.php#L137-L173","documentation":"Thrown by FilesystemManager::resolve() when the 'driver' key is present but no create{Driver}Driver() method exists on the manager and no custom creator was registered via extend(). This covers typos and missing/unsupported driver packages.","triggerScenarios":"Storage::disk($name) where config['driver'] is e.g. 's4', 'aws', or 'google' instead of 's3'/'gcs'; or a driver whose package (league/flysystem-*) is not installed and no extend() registration covers it.","commonSituations":"Driver name typo in config/filesystems.php; third-party driver package not composer-required; driver name case mismatch (the manager uses ucfirst() so 's3' becomes createS3Driver, but a fully custom name needs an exact method or extend() call); config cache stale.","solutions":["Correct the driver name in config/filesystems.php (e.g., 's3', 'local', 'ftp', 'sftp', 'scoped').","composer require the provider package for third-party drivers (e.g., league/flysystem-aws-s3-v3).","For custom drivers, register via Storage::extend('mydriver', fn (...) => ...).","Run php artisan config:clear / config:cache after changes."],"exampleFix":"// before\n'media' => ['driver' => 'aws', ...],\n\n// after\n'media' => ['driver' => 's3', ...],\n// plus: composer require league/flysystem-aws-s3-v3 (^3.0)","handlingStrategy":"validation","validationCode":"$driver = config(\"filesystems.disks.{$name}.driver\");\nif (! method_exists(Storage::getFacadeRoot()->getFileManager(), 'create'.ucfirst($driver).'Driver')\n    && ! array_key_exists($driver, \\Illuminate\\Filesystem\\FilesystemManager::class)) {\n    throw new InvalidArgumentException(\"Driver [{$driver}] is not supported.\");\n}","typeGuard":"function isSupportedDriver(string $driver): bool {\n    return in_array($driver, ['local','public','s3','ftp','sftp','scoped','r2','gcs'], true);\n}","tryCatchPattern":"try {\n    Storage::disk($name);\n} catch (\\InvalidArgumentException $e) {\n    report($e);\n    Storage::extend($driver, fn () => new CustomAdapter(...));\n    Storage::disk($name);\n}","preventionTips":["Use exact driver names: 's3', 'local', 'ftp', 'sftp', 'scoped'.","composer require the league/flysystem-* package for the driver.","Register custom drivers via Storage::extend().","Run config:clear after changes."],"tags":["filesystem","config","driver","unsupported"],"backgroundTag":null,"analyzedSha":"e0f6eb3518ac29fbbca8529e97d0df7fc9f24481","analyzedAt":"2026-08-11T20:52:37.562Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}