Reputation: 38352
I saved all my system wide configurations in db. How do i make the configurations that I have saved in db available everywhere. These need to be available everywhere --in the model, view, controller, component, element etc.
Upvotes: 0
Views: 49
Reputation: 7465
Are you trying to override the Configure::write() function with values that you are storing in the DB? If not, then create a Settings model for your external settings and then pull that data when you need it in the controller. You can then pass those settings to a view (and in turn elements), by following the normal MVC process.
Follow this process:
$uses
array$this->set('settings',
$settings);
Upvotes: 1