Routes Configuration |
What can be the cause of non-working paths by default.
in my: ..\application\Config\Routes PHP Code: $routes->setDefaultNamespace('Modules\Test\Controllers'); // $psr4 in autoload 'Modules\Test' => ROOTPATH.'modules/Test' in my controller: ..\modules\Test\Controllers\Test PHP Code: <?php namespace Modules\Test\Controllers; Controller or its method is not found: Modules\Test\Controllers\\\Test::index The CodeIgniter4 User Guide says that: Quote:When a user visits the root of your site (i.e. example.com) the controller to use is determined by the value set by the setDefaultController() method, unless a route exists for it explicitly. The default value for this is Home which matches the controller at /application/Controllers/Home.php: Worked Only an explicit indication: PHP Code: $routes->add('/', 'Test :: index'); // if Namespace 'App\Controllers' controller in \application\Controllers. Please show an example or tell me what's wrong, thanks! |
Messages In This Thread |
Routes Configuration - by Nome - 09-05-2018, 03:53 AM
RE: Routes Configuration - by dannywebdev - 09-11-2018, 09:20 PM
RE: Routes Configuration - by Nome - 09-13-2018, 05:11 AM
|