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,163
  • 8
  • 39
  • 87
  • 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

3 Answers3

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

Amir
  • 413
  • 4
  • 13
0

The "public" folder may sometimes be missing from the storage/app directory. Create a public folder in the storage/app directory.

Raju Singh
  • 750
  • 8
  • 21
-1

Delete the storage folder and files and run the command

php artisan storage:link
Dharman
  • 30,962
  • 25
  • 85
  • 135
Nabin Rawat
  • 347
  • 4
  • 8