Disk […] does not have a configured driver.

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.

About Pavel Petrov 2 Articles |  21 How-tos
Pavel is a senior developer for the last 7 years, with extended interest in Linux administration, WordPress and Symfony.

Be the first to comment

Leave a Reply

Your email address will not be published.


*