Can't access to config->item from routes.php |
Hello,
I created a personal config_cars.php file who is autoload from autoload.php I can access to my datas like this $this->config->item('') from my controllers but I can't from my routes.php file ! Like this config_cars.php was loaded AFTER routes.php How to access to my personal config file from routes.php ? Thank you.
You can try to define a variable called CAR_CONFIG and load it in your routes like this:
create file car_config: PHP Code: $car_config = array( In your routes.php file: PHP Code: #include the file That should normally work i think |
Welcome Guest, Not a member yet? Register Sign In |