{"record":{"id":"d3eb4f3f3ce180c3","repo":"laravel/framework","slug":"disk-name-does-not-have-a-configured-driver","errorCode":null,"errorMessage":"Disk [{$name}] does not have a configured driver.","messagePattern":"Disk \\[(.+?)\\] does not have a configured driver\\.","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Illuminate/Filesystem/FilesystemManager.php","lineNumber":143,"sourceCode":"    {\n        return $this->disks[$name] ?? $this->resolve($name);\n    }\n\n    /**\n     * Resolve the given disk.\n     *\n     * @param  string  $name\n     * @param  array|null  $config\n     * @return \\Illuminate\\Contracts\\Filesystem\\Filesystem\n     *\n     * @throws \\InvalidArgumentException\n     */\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    /**","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/laravel/framework/blob/e0f6eb3518ac29fbbca8529e97d0df7fc9f24481/src/Illuminate/Filesystem/FilesystemManager.php#L125-L161","documentation":"Thrown by FilesystemManager::resolve() when the resolved disk config array has no 'driver' key. The driver name is required to dispatch to create{Driver}Driver() or a custom creator; an empty/missing driver means the disk definition is incomplete.","triggerScenarios":"Storage::disk($name) (or any Storage facade call resolving that disk) where config/filesystems.php 'disks' entry for $name lacks 'driver', or the entry resolved to an empty array.","commonSituations":"Missing disk entry in config/filesystems.php; env var used for the driver name is unset (e.g., 'driver' => env('FS_DRIVER')); typo in disk key; config cache stale after editing.","solutions":["Add a 'driver' key to the disk config in config/filesystems.php.","Ensure any env() used for the driver has a fallback: env('FS_DRIVER', 'local').","Run php artisan config:clear then config:cache after editing.","Check the disk name spelling matches between Storage::disk($name) and the config key."],"exampleFix":"// before — config/filesystems.php\n'media' => [\n    'root' => storage_path('app/media'),\n],\n\n// after\n'media' => [\n    'driver' => 'local',\n    'root' => storage_path('app/media'),\n],","handlingStrategy":"validation","validationCode":"if (empty(config(\"filesystems.disks.{$name}.driver\"))) {\n    throw new InvalidArgumentException(\"Disk [{$name}] missing 'driver' config.\");\n}\nStorage::disk($name);","typeGuard":"function diskHasDriver(string $name): bool {\n    return ! empty(config(\"filesystems.disks.{$name}.driver\"));\n}","tryCatchPattern":"try {\n    Storage::disk($name);\n} catch (\\InvalidArgumentException $e) {\n    report($e);\n    // fall back to default disk\n    Storage::disk();\n}","preventionTips":["Always include 'driver' in every disks entry.","Provide env() fallbacks: env('FS_DRIVER','local').","Run config:clear/config:cache after editing filesystems.php.","Validate disk names against config keys in tests."],"tags":["filesystem","config","driver","disk"],"backgroundTag":null,"analyzedSha":"e0f6eb3518ac29fbbca8529e97d0df7fc9f24481","analyzedAt":"2026-08-11T20:52:37.562Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}