The solution is simple, but no IDE or debugger reports anything about it. It just returns null. When you use php artisan config:cache, due to the documentation:
php artisan config:cache , , env() .
, env , . php artisan config:clear .
env, . env , config(). , . 'key' => env('CACHE_DRIVER')
, , php artisan config:cache , .env. Laravel , . , .