在laravel 5.8中如何使用默认值读取config / filesystems.php的值:
return [
'default' => env('FILESYSTEM_DRIVER', 'local'),
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
我期望是:
$filesystem_pablic_path = config('filesystem.disks.public');
但是返回空值...
答案 0 :(得分:1)
尝试复数。 $filesystem_pablic_path = config('filesystems.disks.public');