• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Testing Code Modules

#3
(06-10-2019, 06:05 AM)kilishan Wrote: Each module needs it's own namespace defined:

Code:
'Modules\TestModule' => APPPATH.'../modules/Testmodule'

In this mode it's work only with other function. Not with index function. 
In the module/testmodule/config/routes.php i have:
Code:
$routes->group('testmodule', ['namespace' => 'Modules\Testmodule\Controllers'], function($routes)
{
   $routes->add('/', 'Testcont::index');
   $routes->add('(:any)', 'Testcont::$1');
});
it's corrcet? Should be correct the index routing....

Another question:
In this way, all the module must be declared in autoload file.
is it possible to declare only the modules folder and have all the module/config/routes.php files self-autoload?
Reply


Messages In This Thread
Testing Code Modules - by Matleyx - 06-10-2019, 02:14 AM
RE: Testing Code Modules - by kilishan - 06-10-2019, 06:05 AM
RE: Testing Code Modules - by Matleyx - 06-10-2019, 06:36 AM
RE: Testing Code Modules - by kilishan - 06-11-2019, 06:24 AM
RE: Testing Code Modules - by Matleyx - 06-19-2019, 11:24 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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