Custom URL in Laravel Storage


laravel new customstorageurl
cd customstoreurl
php artisan storage:link
Storage symlink in Laravel
Laravel Storage symlink with files

Customizing Laravel Storage links

cd public
mv storage custom
Renaming storage symlink in Laravel

Setting up The Storage Facade

  1. Add in your .env (remember to restart your server after changing environment variables):
'public' => [  'driver' => 'local',  'root' => storage_path('app/public'),  'url' => env('APP_URL').'/storage',  'visibility' => 'public',],
'public' => [  'driver' => 'local',  'root' => storage_path('app/public'),  'url' => env('APP_URL').'/custom',  'visibility' => 'public',],

What’s next?



Web Developer. Soccer fan.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store