On your deployment server if have folder 'public/storage' please delete first (dont worry its linked folder if you earlier use storage:link on developemet environment)
write this code in routes/web.php
Route::get('/create-symlink', function (){
symlink(storage_path('/app/public'), public_path('storage'));
echo "Symlink Created. Thanks";
});
Then run this route from browser `https://yourdomain.com/create-symlink' Then your problem will be solved.
There is alternative way if you have permission to use terminal. On your deployment server if have folder 'public/storage' please delete first (dont worry its linked folder if you earlier use storage:link on developemet environment)
Then run a php artisan command
php artisan storage:link
jaaf, mahbuburriad, wmandai, owentechke, valexdevelopers liked this reply
@jetwes : Thanks. I did that many times without fixing my problem.
@Mahbubur Riad : Thanks. Before reading your answer I deleted the public/storage folder and run php artisan storage:link from the command line and it fixed it. Your answer will be useful for people that do not have a ssh access to their hosting.
mahbuburriad liked this reply
@jose Fournier - Thanks. Thats why i gave you both solution. use as per your solution. Please mark this page solved.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community