![]() |
How to use method function modal data to view codeigniter 4.5.3 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: How to use method function modal data to view codeigniter 4.5.3 (/showthread.php?tid=91548) |
How to use method function modal data to view codeigniter 4.5.3 - startup - 08-29-2024 i have two table cate and subcate Modal.php below PHP Code: public function getCate(){} Controller PHP Code: public function getCate(){ <strong>view</strong> PHP Code: how to get function subCate in view below: can you show me how to use function method data in view above thank RE: How to use method function modal data to view codeigniter 4.5.3 - captain-sensible - 08-29-2024 lets clarify the question ... are you saying you dont quite get how to get data from a model class , which has been instantiated in a controller and that data is passed in the controller along the lines of . Code: Model class is say called BlogModel.php RE: How to use method function modal data to view codeigniter 4.5.3 - startup - 08-29-2024 (08-29-2024, 12:57 PM)captain-sensible Wrote: lets clarify the question ... are you saying you dont quite get how to get data from a model class , which has been instantiated in a controller and that data is passed in the controller along the lines of .Thank you very much for your instructions but I want to ask if in codeigniter 4 can get methods directly in the view as codeigniter 3 or not, I can write other function in controller to pass to view by the way, thank you for your support RE: How to use method function modal data to view codeigniter 4.5.3 - captain-sensible - 08-30-2024 The MVC pattern is to have the controller to use a model to get data then pass to view ; its the only way i have ever done it. RE: How to use method function modal data to view codeigniter 4.5.3 - Renta Ardhana - 09-01-2024 In certain situations, we want the user to be able to modify the theme easily without directly interacting with the controllers or models. One possible solution is to use a View Model, which allows us to request data from the View components. RE: How to use method function modal data to view codeigniter 4.5.3 - InsiteFX - 09-01-2024 CodeIgniter 4 User Guide - Building Responses - View Decorators CodeIgniter 4 User Guide - Building Responses - View Cells |