• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme ¬© 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.