G
G
good_beginer2018-11-08 15:33:37
CodeIgniter
good_beginer, 2018-11-08 15:33:37

Is it possible to pull data from the model in config/config.php?

How can I take data from some model and insert it into config as a variable ?. I can’t transfer anything there, it’s kind of a neutral file, just pull
PS I automate the old site and it’s easier to change it in the config than in 100 different places

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
krypt3r, 2018-11-08
@krypt3r

The config lists constants, and as I understand it, you want to insert some variable from the model there.

A
Alams Stoyne, 2018-11-08
@alams_stoyne

And why don't you globally for the entire application pick up your model in application/config/autoload.php and use the functions / variables of this model where necessary?
P.s line $autoload['model'] = array();
Added: In extreme cases, you can also pick up an additional configuration file $autoload['config'] = array();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question