• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Could not load model over Autoload

#4
How are you listing the model in your config/autoload.php file? To get the same result as this:

PHP Code:
$this->_ci->load->model('rights/Users_to_groups_model''users_to_groups'); 

You need to use something like this:

PHP Code:
$autoload['model'] = ['rights/Users_to_groups_model' => 'users_to_groups']; 

However, it should also be noted that this depends on where you are attempting to use the model. Classes in the autoload config are not loaded until the Controller's constructor has been executed, so some hooks will execute before the model is loaded.
Reply


Messages In This Thread
Could not load model over Autoload - by Maliko - 02-08-2016, 08:20 AM
RE: Could not load model over Autoload - by mwhitney - 02-15-2016, 12:20 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.