【发布时间】:2019-12-29 18:57:50
【问题描述】:
我想将图像上传到 imgs 文件夹内的公共文件夹,所以我尝试将以下内容添加到 cofig/filesystems.php:
'pub' => [
'driver' => 'local',
'root' => '/imgs',
'url' => env('APP_URL').'/public',
'visibility' => 'public',
]
但现在当我使用 $d->storeAs('products', $name.$ext, ['storage' => 'pub']); 时,图像保存在 storage/app/public/imgs/products 中,而不是 public/imgs/products 中
我如何将它们存储在公共而不是存储中?
【问题讨论】:
-
你有什么特别的原因要使用公用文件夹吗?
标签: laravel laravel-5 laravel-5.8