![]() |
Model loading not working? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Model loading not working? (/showthread.php?tid=46747) |
Model loading not working? - El Forum - 11-14-2011 [eluser]KacperK[/eluser] Hi guys, In my Company controller function enum() I try to use a static function in the model Company (which extends the class Model) to list all the objects of type Company. When I try this in my controller. $this->load->model('Company'); It loads the controller class Company (I know this because of: var_dump(get_class_methods($this->Company)); But when I do a rename of the model to Company_model and then try to reload with: $this->load->model('Company_model'); It gives me this error: Fatal error: Class 'Company_model' not found in /var/www/html/servicedesk-kacper/system/core/Loader.php on line 188. I noticed that it actually loads the file because I get a syntax error when I do a random change in the model. Any help would be appreciated! Kacper P.S. except for the Model supperclass all models have a lowercase filename. |