Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Config::load
  • Hi. I'm new. I need some help with loading configs value from database. My PHP code:
    $DbConfig = DB::select('name', 'value')->from('configs')->where('category', 'core')->execute();
    Config::load($DbConfig);
    Config::get('website_url');
    
    I get from database config values and put to the config class. I think that will be good idea implements config form database to the core fuel config but my examples doesn't working. How can I get config values from database and set or load to the core fuel config?
  • At the moment there isn't a config driver for DB yet. If you think that's handy, please open a feature request on https://github.com/fuel/core/issues. In the meantime, you can work around it by directly updating \Config::$items.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion