Routing to a module adds App\Controllers to the route |
I need a little help to get a module to load correctly.
My problem is that the handler generated for my defined route seems to prefix App\Controllers to the route in the module folder My Directory Structure is as follows: Code: ├── app \app\Config\Autoload.php PHP Code: <?php \app\Config\Routes.php PHP Code: <?php \modules\admin\Config\Routes.php PHP Code: <?php \modules\admin\Controllers\User.php PHP Code: <?php In the CI4 debug toolbar from http://localhost:8080/ (and http://localhost:8080/reachability): Code: MATCHED ROUTE From http://localhost:8080/admin I only get a 404 error: Controller or its method is not found: \App\Controllers\Modules\admin\Controllers\User::validate I do not get a CI4 debug toolbar icon on this url. I suspect it is something I don't understand about namespaces. I am new to CI. Thank you for any assistance PHP Code: 'Modules\admin' => ROOTPATH . 'modules\admin', What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Apologies for the late reply. Only getting to this now.
Thanks, the two answers combined to give me success. |
Welcome Guest, Not a member yet? Register Sign In |