Laravel storage link won't work on production
I see that the question has been answered but I want to suggest another solution which i found to be easy.
Go to the route folder your-app-folder/routes/web.php
and register a new route as follows
Route::get('/linkstorage', function () {
Artisan::call('storage:link');
});
then go to your website www.example.com/linkstorage
and it will take you to a blank page.
that's it. The storage folder will be create. I hope it helps someone.
I just encountered this problem, and this is how I fixed it, without the need of SSH'ing into the server or running a CronJob:
For Laravel 5+ (Haven't tested with lower version)
You may use Artisan::call()
method inside your route/controller to execute artisan commands without using the terminal.
$exitCode = Artisan::call('storage:link', [] );
echo $exitCode; // 0 exit code for no errors.
delete folder storage From public and run this Command in Cron Job [ one time ]
ln -s /home/public_html/storage/app/public/home/dev5/public_html/public/storage