【发布时间】:2016-09-29 18:41:15
【问题描述】:
我正在使用 laravel 图像干预。我的 Storage 文件夹中存储了一些文件,位于 /storage/app/public/images 的路径中。当我尝试生成文件的路径时由
$path=Storage::disk('local')->url('screenshot1.jpg');
并做 dd($path),它给了我这样的路径,
"/storage/screenshot1.jpg"
我想要一条路,
"/storage/app/public/images/screenshot1.jpg"
我还在我的 filesystem.php 中进行了一些更改以获得所需的路径,
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app/public/images'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public/images'),
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => 'your-key',
'secret' => 'your-secret',
'region' => 'your-region',
'bucket' => 'your-bucket',
],
],
但还是不行..
【问题讨论】:
标签: php laravel-5.2