Passing custom model function data through _variables
Hi!
Can anybody tell me if it is possible to pass the results of a custom model function (ex.: femaleSubscirbers($state) in the "subsribers" model) through to a view using the _variables file?
I can get information out using the fuel_model() function but I'd like to use the custom function and I can't figure out how to do it or if it's even possible. I'm used to the CI way of using models but I like the opt-in controller philosophy of Fuel...
Thanks
Comments
$CI =& get_instance(); // $CI may already exist and you may not need to do this $CI->load->model('subscribers'); $data = $CI->subscribers->femaleSubscribers($state); ...
I tried it and got:
Unable to locate the file: subscribers.php
So I tried changing the subscribers to subcribers_model and got:
Fatal error: Uncaught exception 'Exception' with message 'Method femaleSubscribers does not exist.' in C:\wamp\www\1-durapac\fuel\application\core\MY_Model.php on line 2322
( ! ) Exception: Method femaleSubscribers does not exist. in C:\wamp\www\1-durapac\fuel\application\core\MY_Model.php on line 2322
I must be missing something obvious, again... :-\ Any ideas?
Works like a charm, admin. Thxs