How to troubleshoot the “Disk … does not have a configured driver.” in Laravel.
When you come across this issue check the following:
1. Open: ‘config/filesystems.php’ and check if your disk is defined in the following way:
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
'public_html' => [
'driver' => 'local',
'root' => base_path('public_html/storage'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
...
]
2. If you’ve defined the disk but still see this message run:
php artisan config:clear
That should clean the config cache and load your disk properly.
Leave a Reply