Need Help with Modules |
Hello! I'm trying to add independent modules to my application. I am following the official Guide.
https://codeigniter4.github.io/userguide...dules.html But seems like I missed something... Cause I am getting a 404 error when I try to access to the Default Home Controller of my Blog Module. Basically the first thing I did is create a new folder in the Project Root app/ public/ system/ writable/ modules/ modules/Blog/ modules/Blog/config/ modules/Blog/Controllers/ modules/Blog/Models/... ... ... Then I create a new namespace for this modules folder in app/Config/Autoload.php PHP Code: $psr4 = [ After that I add that to the Active Explorers (I am not sure what I have to add here... The name of the Namespace? Folder?) app/Config/Modules.php PHP Code: public $activeExplorers = [ Next Step is add the Route to the app/Config/Routes.php PHP Code: $routes->group('blog', ['namespace' => 'Modules\Blog\Controllers'], function($routes) But I got a 404 when I call this route... (baseURL)/blog modules/Blog/Controllers/Home.php - I dont know if have to change the namespace inside Blog Controller... But I tried too... and still the same. PHP Code: <?php namespace App\Controllers; Thanks. |
Messages In This Thread |
Need Help with Modules - by Programaciones Web - 02-26-2020, 10:48 AM
RE: Need Help with Modules - by InsiteFX - 02-26-2020, 04:05 PM
RE: Need Help with Modules - by Programaciones Web - 02-26-2020, 05:35 PM
RE: Need Help with Modules - by InsiteFX - 02-27-2020, 03:23 PM
RE: Need Help with Modules - by MGatner - 03-01-2020, 09:00 AM
|