Welcome Guest, Not a member yet? Register   Sign In
Testing Code Modules
#1

Hi!

I'm Matleyx, and i'm testing the code Module in CI4

You see my file in the attachment.

I modified the autoload file, adding this line in Psr4:


Code:
'Modules'                   => APPPATH.'../modules'

but i have a problem with Routes file.
I'll explain:

This is the line for routes.php

Code:
$routes->group('testmodule', ['namespace' => 'Modules\Testmodule\Controllers'], function($routes)
{
    $routes->add('/', 'Testcont::index');
    $routes->add('(:any)', 'Testcont::$1');

This work only if i put this line in /app/Config/Routes.php. (localhost/ci4/public/testmodule/ecc

If i put the lines in the /modules/Testmodule/Config/Routes.php, don't work.

How do I make it work with module/Testmodule/Config/Routes.php?

Thanks to all
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



Theme © iAndrew 2016 - Forum software by © MyBB