I have uploaded a voyager admin panel in my cPanel.
It gives error Missing storage symlink
and images are not shown of new added item.
Suppose I want to add a new user. All information is shown of new user accept user avatar.
In locally error is easily fixed by running the cmd php artisan storage:link
.
But in live server how to fixed this error ?
I have already change the path of storage driver
in config/filesystems.php
. Change the path from storage_path()
to public_path()
'public' => [
'driver' => 'local',
'root' => public_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
7
Answers
It is a path related problem. I have changed the
App_url
in my.env
file. Now it's successfully showing the image.FIXED !!
Delete
public/storage
folder and run the command in cmdphp artisan storage:link
I had the same issue. It happened because the file structure or something changed from the original Laravel setup. For me, I switched from using Artisan to vagrant.
I resolved by logging into vagrant and removing the original symlink:
I went ahead and created the new symlink but you should now be able to click the Fix link in Voyager admin to create the new one.
You need to change the storage path into de filesystems.php file
to:
I’ve fixed this by deleting the public/storage link and folder and then create again the folder and then:
EDIT:
I also had to set this configuration in the filesystems.php
this works for me !
I’ve fixed this by most easy way: