Since a couple of days I can't load a model in a codeigniter system anymore.
It gives the following error:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Clients::$mdl_clients
Filename: controllers/clients.php
Line Number: 48
Controller code:
private function GetAllClients()
{
$this->load->model('clients_model', 'mdl_clients');
$clients = $this->mdl_clients->getClients()->result_array();
return $clients;
}
I read the codeigniter documentation again, and I'am not doing anything wrong that I'am aware of.. Can you guys help me out?
It was a weird issue with my server. I uploaded everything to another, and it worked again
Change the model name by 'clients_model.php' if you dont have, and your class most name 'Clients_model'