Calling a model method in a view
Introduction#
Sometimes is more usefull make a call to a model’s method in our view, so this is a way to make it
Save a method call in a variable
In Controller:
$this->load->model('your_model');
$data['model'] = $this->your_model;
In view:
$model->your_method;