Reputation: 2785
I have the problem that I can not set my configuration values through the config() function.
I have my own config file (cms.php in config/). The value I want to change is 'index'.
In my ConfigController I try to set the value with this:
config(['cms.index' => $page_id]);
Any solutions? Do I have to import a special class?
Upvotes: 0
Views: 9064
Reputation: 3308
config(['cms.index' => $page_id]);
will set the value for runtime only. It won't save it to the config file.
If you want persistent configurations take a look at Update Config on Runtime Persistently
Upvotes: 6