Codeigniter optimization / best place to load models is? Codeigniter optimization / best place to load models is? codeigniter codeigniter

Codeigniter optimization / best place to load models is?


Models that will be used consistently on all the site's pages are best autoloaded in the config/autoload.php file. Models that are used throughout all the methods of a controller, should be loaded in that controller's constructor. Models that are only needed in certain methods within a controller, should be loaded inside those methods.