We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When executing the php artisan db console command while having read and write hosts setup in config/database.php it returns this error:
php artisan db
config/database.php
╰─ff php artisan db ErrorException Undefined array key "host" at vendor/laravel/framework/src/Illuminate/Database/Console/DbCommand.php:141 137▕ */ 138▕ protected function getMysqlArguments(array $connection) 139▕ { 140▕ return array_merge([ ➜ 141▕ '--host='.$connection['host'], 142▕ '--port='.$connection['port'], 143▕ '--user='.$connection['username'], 144▕ ], $this->getOptionalArguments([ 145▕ 'password' => '--password='.$connection['password'], +16 vendor frames 17 artisan:37 Illuminate\Foundation\Console\Kernel::handle()
The text was updated successfully, but these errors were encountered:
I understand that i can select --read or --write but it should throw a warning or a better error in my opinion if there's no default host and only using read/write as exampled here: https://laravel.com/docs/9.x/database#read-and-write-connections
Sorry, something went wrong.
Or select read by default
db
Thanks. We added a more descriptive message for this.
jbrooksuk
joedixon
Successfully merging a pull request may close this issue.
Description:
When executing the
php artisan db
console command while having read and write hosts setup inconfig/database.php
it returns this error:Steps To Reproduce:
php artisan db
The text was updated successfully, but these errors were encountered: