Fix use of Storage::url() for local disks that haven't been configured correctly. Fixes #4581
This commit is contained in:
parent
1f47846832
commit
02d894f52b
|
|
@ -46,6 +46,7 @@ return [
|
|||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app'),
|
||||
'url' => '/storage/app',
|
||||
],
|
||||
|
||||
's3' => [
|
||||
|
|
|
|||
|
|
@ -88,6 +88,13 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
Schema::defaultStringLength(191);
|
||||
}
|
||||
|
||||
// Fix use of Storage::url() for local disks that haven't been configured correctly
|
||||
foreach (Config::get('filesystems.disks') as $key => $config) {
|
||||
if ($config['driver'] === 'local' && ends_with($config['root'], '/storage/app') && empty($config['url'])) {
|
||||
Config::set("filesystems.disks.$key.url", '/storage/app');
|
||||
}
|
||||
}
|
||||
|
||||
Paginator::defaultSimpleView('system::pagination.simple-default');
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue