I'm trying to host a Laravel project in a shared hosting using Hostinger and I am having problems with the assets. The sample folder is here sample folder , I'm not really sure on how to make this connection with my public folder and resources folder. I've already use php artisan storage:link
before I uploaded the project.
I assume you don't have shell access in your shared hosting account.
One way to do this is to create a temporal route that runs the artisan command.
Firstly, before you upload, delete the existing storage link from public
rm public/storage
Route::get('create-symlink', function (){
Artisan::call('storage:link');
return response('Done...');
});
Remeber to remove or comment out the route when done.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.