简体   繁体   English

如何在 Laravel Voyager 中更改正确的图像路径

[英]how to change correct Image path in Laravel Voyager

I am facing image path problem in my Laravel Voyager admin panel.我在 Laravel Voyager 管理面板中遇到图像路径问题。

User image is shown correctly.用户图像显示正确。 Here is an image with image path这是带有图像路径的图像

在此处输入图片说明

But other images is not shown correctly.但其他图像未正确显示。 Here is an image with image path这是带有图像路径的图像

在此处输入图片说明

If I change the image path from inspect element then that image is shown correctly.如果我从inspect element更改图像路径,则该图像将正确显示。 在此处输入图片说明

So my question is where to change the image path for showing correct image in Voyager admin panel ?所以我的问题是在哪里更改图像路径以在 Voyager 管理面板中显示正确的图像?

Image upload in /storage folder.图片上传到/storage文件夹。 Here is the config/filesystem.php这是config/filesystem.php

'disks' => [

    'local' => [
        'driver' => 'local',
        'root' => storage_path('app'),
    ],

    'public' => [
        'driver' => 'local',
        'root' => storage_path(''),
        'url' => env('APP_URL').'/storage',
        'visibility' => 'public',
    ],

    's3' => [
        'driver' => 's3',
        'key' => env('AWS_ACCESS_KEY_ID'),
        'secret' => env('AWS_SECRET_ACCESS_KEY'),
        'region' => env('AWS_DEFAULT_REGION'),
        'bucket' => env('AWS_BUCKET'),
        'url' => env('AWS_URL'),
    ],

],

Anybody help please ?有人帮忙吗? Thanks in advance提前致谢

您必须更新 .env 文件中的 APP_URL

APP_URL = "http://gotravelsglobal.com/travel/public"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM