app icon indicating copy to clipboard operation
app copied to clipboard

Error env calling at database config setup

Open dmekhov opened this issue 7 months ago • 0 comments

Base scaffold have env function call in app/config/database.php

'driver' => env('DB_CONNECTION', 'sqlite'),
https://github.com/spiral/app/blob/master/app/config/database.php#L30

but it seems like env doesn't working properly at that moment

I've got an error here

php app.php db:list
[Cycle\Database\Exception\ConfigException]
Undefined driver ``
in vendor/cycle/database/src/Config/DatabaseConfig.php:107

if I set

'databases' => [
        'default' => ['driver' => 'sqlite'],
],

everything is ok

dmekhov avatar Jul 08 '24 19:07 dmekhov