I deployed a Laravel 5.5 application on shared hosting and I have a problem with uploading/viewing images.
Everything is working well on localhost but when I upload it online I can't access the directory where my images are stored.
Here is where is store my images
$destinationPath = public_path('items/'.$request->get('modal-item-id'));
And it is storing image in :
public_html/nbd/public/items/307/my-image.png
Also here is my filesystems.php
settings for 'images':
'images' => [
'driver' => 'local',
'root' => public_path('items'),
'url' => env('APP_URL').'/items',
visibility' => 'public',
],
My app is located in
public_html/nbd/system
...and because I had to put PUBLIC folder out of the systems folder (shared hosting) now I can't access the image on https://my-url/system/public/items/307/my-image.png
How can I access that file? Where did I make a mistake?