1
我正在使用laravel图像干预。我在/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',
],
],
,但仍然无法正常工作..
我有存储在公共文件夹中这些图像但它仍然返回相同的路径,我必须对这个filesystem.php文件进行更改 –
做存储/应用程序/公共/图像的公共/图像符号链接 –
这是我的gitbash返回, $ ln -s存储/ app/public/images public/images ln:未能创建符号链接'public/images':没有这样的文件或目录 –