Problem when to load library in model |
Hi!
In the file autoload.php the var $autoload['libraries'], I load a library generated by me, the name of this library is datetime. In a model I try to load this library ($this->datetime), If it worked in Codeigniter 2.x, but in Codeigniter 3 not working, the var $this in the model execute el magic method. What I have to do to access the library from the model? Thanks. Carlos V
(02-21-2016, 04:15 AM)carlos.vv Wrote: What I have to do to access the library from the model? Nothing has change in CI3, it should work the same way as in CI2. Double check all the steps to migrate from CI2 to CI3. Something must be wrong (UCfirst filename perhaps?)
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Just a thought. Since PHP already has a Datetime class , maybe naming a class with the same name is bad. Does it work if you rename it?
|
Welcome Guest, Not a member yet? Register Sign In |