diff --git a/framework/core/src/Filesystem/FilesystemManager.php b/framework/core/src/Filesystem/FilesystemManager.php index c31fa2e7b..95e3c057f 100644 --- a/framework/core/src/Filesystem/FilesystemManager.php +++ b/framework/core/src/Filesystem/FilesystemManager.php @@ -35,16 +35,16 @@ class FilesystemManager extends LaravelFilesystemManager /** * @inheritDoc */ - protected function resolve($name): Filesystem + protected function resolve($name, $config = null): Filesystem { - $driver = $this->getDriver($name); - - $localConfig = $this->getLocalConfig($name); + $localConfig = $config ?? $this->getLocalConfig($name); if (empty($localConfig)) { throw new InvalidArgumentException("Disk [{$name}] has not been declared. Use the Filesystem extender to do this."); } + $driver = $config['driver'] ?? $this->getDriver($name); + if ($driver === 'local') { return $this->createLocalDriver($localConfig); }