How to use 'setting'? #70
-
My initial thought was to use this package to persist various App settings separated in appropriate groups (Email Account Settings, Database Connection Settings, ...). Everything was going in right direction until I came to the point when I wanted to use the settings stored in database. By following the examples, I was able to integrate "show" and "update" logic for three separate setting groups (simple UI using Vue JS). All variables for each group are properly read from DB, and I can successfully edit and update any of them. How should one use these stored settings in place of variables found in ENV or CONFIG files? Most simple example that I can think of is: I've tried to use Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @fermevc, I haven't tried such approach with overwriting config and .env values, though it should be possible. You can create a |
Beta Was this translation helpful? Give feedback.
Hi @fermevc,
I haven't tried such approach with overwriting config and .env values, though it should be possible. You can create a
SettingsProvider
(https://laravel.com/docs/8.x/providers) which would overwrite the config values when it is booted. Not totally sure if that would completely work. But I think it's a good starting point for solving this issue.