Ancillary Classes in CI4 |
(07-29-2020, 02:58 AM)InsiteFX Wrote: There is no CI 4 get_instance like CI 3 it's all OOP now.How to call the controller function or model function inside a particular helper function? function allcustomers($x) { $ci =& get_instance(); $customer_datas=$ci->invoice_model->getallcustomers($x); echo "<select id='customer' name='customer' class='form-control required' required>"; echo '<option value="">Please Select</option>'; foreach($customer_datas as $listcustomer) { echo "<option value='$listcustomer[customer_id]'>$listcustomer[customer_name]</option>"; } echo "</select>"; } |
Messages In This Thread |
Ancillary Classes in CI4 - by psreejiths - 07-29-2020, 01:20 AM
RE: Ancillary Classes in CI4 - by InsiteFX - 07-29-2020, 02:58 AM
RE: Ancillary Classes in CI4 - by psreejiths - 07-30-2020, 03:10 AM
|