spatie / laravel-backup

A package to backup your Laravel app
https://spatie.be/docs/laravel-backup
MIT License
5.65k stars 763 forks source link

Update `databases` key to use `DB_CONNECTION` from .env #1714

Closed maskeynihal closed 1 year ago

maskeynihal commented 1 year ago

Utilizing env('DB_CONNECTION') enables the package to function seamlessly without requiring any adjustments to the backup.php configuration file. It automatically derives the database connection information from the corresponding environment variable, ensuring flexibility in database selection based on the environment.

freekmurze commented 1 year ago

I think this is a good idea, but it could be considered a breaking change, as there are situations this change will result in a different db being backed up. I'll revisit this when creating a new major version of this package.