Welcome Guest, Not a member yet? Register   Sign In
Load routes from file
#5

Thx. Great, that makes sense
(04-02-2020, 02:26 PM)FoLez Wrote: And if you use this code in the Config/Routes.php file
Add its to 14 line
PHP Code:
$request = new Request(new \Config\App);
if ( 
$request->uri->getSegment(1) == 'admin' ) {
    return \
Config\BackedRoutes;
} else {
    return \
Config\FrontRoutes;

and add to line 3 this use namespace 
PHP Code:
use CodeIgniter\HTTP\Request
Reply


Messages In This Thread
Load routes from file - by Michal_PB1 - 04-02-2020, 07:16 AM
RE: Load routes from file - by InsiteFX - 04-02-2020, 07:53 AM
RE: Load routes from file - by Michal_PB1 - 04-02-2020, 09:06 AM
RE: Load routes from file - by FoLez - 04-02-2020, 02:26 PM
RE: Load routes from file - by Michal_PB1 - 04-03-2020, 03:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB