How to create Storage Link in Web Hosting in Laravel

If you upload the files into storage folder in laravel then you need run storage command if you want to display it on your website or you want to access it publicly so following is the code to run the command.

php artisan storage:link

You can create a route as well to run this command into your project.

Route::get('create-link', function() {
    Artisan::call('storage:link');
});

Leave a Comment