rawilk / laravel-settings

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

[Feature Request]: Override config values #67

Open HamasakiBrain opened 4 days ago

HamasakiBrain commented 4 days 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 4 days ago

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

HamasakiBrain commented 3 days ago

@rawilk