Set Environment via Config\App - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: Set Environment via Config\App (/showthread.php?tid=75114) |
Set Environment via Config\App - Mostafa Khudair - 12-24-2019 Hello guys, I was thinking of a simple way to change between supported framework environments, so i made this. Step 1: we need to configure environment via \Config\App at App/Config/App.php file: PHP Code: <?php namespace Config; Step 2: we should add default supported environments list in system\CodeIgniter.php file: PHP Code: <?php namespace CodeIgniter; Step 3: we have to edit some codes to make it work as expected, search for detectEnvironment() function in system\CodeIgniter.php file: PHP Code: protected function detectEnvironment() Thats all for me, I'm new in php world so I don't know what are the consequences. RE: Set Environment via Config\App - InsiteFX - 12-26-2019 CodeIgniter 4 User Guide - Handling Multiple Environments |