I am trying to display images on laravel shared hosting but I cannot get it to work.
On my local host I am using this:
return asset("assets/avatars/avatar.png");
But on my shared hosting it does not find the image. So I have to use this:
return asset("public/assets/avatars/avatar.png");
With adding the public. Is there any way I can make it universal so I do not have to change the code everytime I upload?