Welcome Guest, Not a member yet? Register   Sign In
Model loading not working?
#1

[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.




Theme © iAndrew 2016 - Forum software by © MyBB