Codeigniter 4: Get value from BaseController to custom helper - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Codeigniter 4: Get value from BaseController to custom helper (/showthread.php?tid=77929) |
Codeigniter 4: Get value from BaseController to custom helper - Hemil Sarker - 11-05-2020 Seems get_instance() is no longer working in Codeigniter 4. But I need to get some value from BaseController to my custom_helper. Here is my code snippet: BaseController.php Code: <?php namespace App\Controllers; custom_helper.php Code: <?php I'm not sure is it possible or not! I'm newbie in CI4. Please suggest if is there any solutions. Thanks in advance. RE: Codeigniter 4: Get value from BaseController to custom helper - InsiteFX - 11-05-2020 Pass it from the BaseController to your helper using sessions. |