0

In my laravel project i have put my files in storage directory. Some of my files i need to access from public folder inside storage directory i.e. storage/app/public/images

In my server i have put the laravel public folder inside public_html and other folders outside of public_html.

As for accessing storage file publicly i need to run the following command:

php artisan storage:link 

But when i run the above command in server i got following Error:

In Filesystem.php line 228: symlink(): No such file or directory

How to access public folder inside storage directory when laravel public folder inside public_html on server?

Hola
  • 2,067
  • 7
  • 37
  • 81
  • check this link if shared hosting https://stackoverflow.com/questions/47409417/storage-in-laravel-says-symlink-no-such-file/55699608#55699608 – Al-Amin Jun 11 '19 at 04:52

2 Answers2

1

You changed the laravel default public folder to public_html. So you should first fix laravel public directory path and then run that artisan command. The solution to fix laravel public directory path is here : https://stackoverflow.com/a/30198781/4835268

AmirhosseinDZ
  • 395
  • 2
  • 12
-1

Delete the storage folder and files and run the command

php artisan storage:link
Dharman
  • 26,923
  • 21
  • 73
  • 125
Nabin Rawat
  • 327
  • 4
  • 7