diff --git a/src/Illuminate/Filesystem/FilesystemAdapter.php b/src/Illuminate/Filesystem/FilesystemAdapter.php index 5ba22a4d1934..c62e008ea479 100644 --- a/src/Illuminate/Filesystem/FilesystemAdapter.php +++ b/src/Illuminate/Filesystem/FilesystemAdapter.php @@ -287,15 +287,16 @@ public function url($path) return $adapter->getClient()->getObjectUrl($adapter->getBucket(), $path); } elseif ($adapter instanceof LocalAdapter) { - $flysystemConfig = $this->driver->getConfig(); + $config = $this->driver->getConfig(); - if ($flysystemConfig->has('url_root')) { - return $flysystemConfig->get('url_root').'/'.$path; + if ($config->has('url')) { + return $config->get('url').'/'.$path; } $path = '/storage/'.$path; - return Str::contains($path, '/storage/public') ? Str::replaceFirst('/public', '', $path) : $path; + return Str::contains($path, '/storage/public') ? + Str::replaceFirst('/public', '', $path) : $path; } else { throw new RuntimeException('This driver does not support retrieving URLs.'); } diff --git a/src/Illuminate/Filesystem/FilesystemManager.php b/src/Illuminate/Filesystem/FilesystemManager.php index 380ac097d632..a5142377738e 100644 --- a/src/Illuminate/Filesystem/FilesystemManager.php +++ b/src/Illuminate/Filesystem/FilesystemManager.php @@ -255,7 +255,7 @@ protected function getRackspaceContainer(Rackspace $client, array $config) */ protected function createFlysystem(AdapterInterface $adapter, array $config) { - $config = Arr::only($config, ['visibility', 'disable_asserts', 'url_root']); + $config = Arr::only($config, ['visibility', 'disable_asserts', 'url']); return new Flysystem($adapter, count($config) > 0 ? $config : null); }