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
I have a database connection defined as follows:
'mysql' => [ 'read' => [ 'host' => env('DB_READ_HOST', 'localhost'), ], 'write' => [ 'host' => env('DB_WRITE_HOST', 'localhost') ], 'driver' => 'mysql', // Other parameters ],
When I try to run php artisan backup:run, I see the Backup failed because: Undefined index: host. error, because I am not setting a host directly.
php artisan backup:run
Backup failed because: Undefined index: host.
There should be a check performed to check if there is a read host first, and if there isn't, use the host value of the database connection.
read
host
The text was updated successfully, but these errors were encountered:
Yup, this should be fixed. I'll try to make some time for this in the coming weeks. I'd also accept a PR if you need this quick. Be sure to add tests.
Sorry, something went wrong.
So let's say https://github.com/spatie/laravel-backup/blob/master/src/Tasks/Backup/BackupJobFactory.php could use some spice from https://github.com/illuminate/database/blob/master/Connectors/ConnectionFactory.php.
I'm I right?
Support for read database connections has been added in v4.1.0 of this package.
v4.1.0
No branches or pull requests
I have a database connection defined as follows:
When I try to run
php artisan backup:run
, I see theBackup failed because: Undefined index: host.
error, because I am not setting a host directly.There should be a check performed to check if there is a
read
host first, and if there isn't, use thehost
value of the database connection.The text was updated successfully, but these errors were encountered: