i am in Hostinger shared host, and in subdomain..so my Laravel project inside (osamaStartup) folder:
username/ domains/ osamamy.com/ public_html/ osamaStartup
I really tried everything, like using a PHP file to make a symlink, but it give me an error message that the symlink function is not defined...
also, I have tried to make a link using the command (ln -s) but it doesn't work:
ln -s ../storage/app/public/ storage/
.... hope anyone here can solve this problem.... thanks in advance
CodePudding user response:
To make these files accessible from the web, you should create a symbolic link from public/storage
to storage/app/public
.
To create the symbolic link, you may use the storage:link
Artisan command:
php artisan storage:link
You can read more here
https://laravel.com/docs/9.x/filesystem/#the-public-disk
CodePudding user response:
after one year of suffering from Hostinger, finally, I just upgrade to Business shared hosting, and now everything working well .... this command is run successfully :
PHP artisan storage:link