CodeIgniter Forums

Full Version: Can I use Model function in a plugin?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

I am getting an error with this in plugin.

$catname = $this->ModelCats->getCategoryNamebyProduct($category_id);

It seems I can't use like $this->Modelname in plugin.

The model is autoloaded.

Can anyone suggest the best way? Do I need to change it to helper or library?

El Forum


ctrl + f "Utilizing CodeIgniter Resources within Your Library"