File not recognizing Model For Some Reason
I created a module for my home page called "homeslider". Where basically someone can upload an image location and image content to the database by way of fuel admin. That part works. The information is saved to the database. Now I want to reference the table data on the home page.
Now the home page (home.php) is in view and it pulls most of the view from the blocks (_blocks/header.php and _blocks/footer.php). Now in home.php I'm trying to pull from the homeslider table so I reference the model file homeslider_model.php. Here's that code:
<?php fuel_set_var('layout', 'main'); ?>
<?php
$CI = & get_instance();
$CI->load->model('homeslider_model');
$values = $this->homeslider_model->find_all();
//var_dump($values);
?>
However, I'm getting this error:
Severity: Notice
Message: Undefined property: MY_Loader::$homeslider_model
Filename: fuel/Loader.php(298) : eval()'d code
Line Number: 10
I'm almost stumped on this one because it looks like I'm doing everything right.
Comments
$values = $CI->homeslider_model->find_all(); foreach($values as $val) { echo $val->image; }