Welcome Guest, Not a member yet? Register   Sign In
How can you configure routes for such a structure.
#2

First off you need to add the Modules an all the other directories to the PSR4 
in  ./application/autoload.php

Something like this, just an Example.

PHP Code:
$psr4 = [
        
'Config'      => APPPATH 'Config',
        
APP_NAMESPACE => APPPATH                   // For custom namespace
        
'App'         => APPPATH                   // To ensure filters, etc still found,
        
'Modules'     => ROOTPATH.'Modules',        // Modules Location
        
'Shop'          => ROOTPATH.'Modules/Shop',    // Shop location
        
'Blog'          => ROOTPATH.'Modules/Blog',    // Blog Location
        
'Forum'          => ROOTPATH.'Modules/Forum',    // Forum Location
        
]; 

In your routes file use the namespace where your modules etc are.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: How can you configure routes for such a structure. - by InsiteFX - 11-02-2018, 04:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB