rawilk / laravel-settings

Store Laravel application settings in the database.
https://randallwilk.dev/docs/laravel-settings
MIT License
185 stars 17 forks source link

[Feature Request]: Override config values #67

Closed HamasakiBrain closed 3 weeks ago

HamasakiBrain commented 1 month ago

Feature Description

Override Config Values

You can easily override default config values by adding them to the override option in config/setting.php, thereby eliminating the need to modify the default config files and also allowing you to change said values during production. Ex:

'override' => [
    "app.name" => "app_name",
    "app.env" => "app_env",
    "mail.driver" => "app_mail_driver",
    "mail.host" => "app_mail_host",
],

The values on the left corresponds to the respective config value (Ex: config('app.name')) and the value on the right is the name of the key in your settings table/json file.

Is this feature valuable for other users as well and why?

If the library supports redefinition of configuration values, it is easily integrated with other third-party packages that may also offer their own configuration capabilities. This reduces the likelihood of conflicts and makes the system more compatible and extensible.

HamasakiBrain commented 1 month ago

Reference: https://github.com/akaunting/laravel-setting?tab=readme-ov-file#override-config-values

HamasakiBrain commented 1 month ago

@rawilk

rawilk commented 3 weeks ago

Hey, I'm not sure I'm interested in implementing this kind of feature at this time for the package. I personally don't really have a need to do it like that, and it's not something I want to maintain right now. In the future I may revisit this, but for now I think I'll pass on it.