Routing and modules |
I'm trying to separate my project in different modules.
I've the following modules - admin - portal - site The main controller is site, there is where users land for the first time. Here are my routes on Modules\Site\Config\Routes.php PHP Code: /** This works perfectly. When I request the home page or any other controller on that namespace works without issues. If I request /register or /recover or /about it works. The problem starts when trying to use any of the other modules, let's use admin as an example. This is my Routes.php file inside the admin module. (Modules\Admin\Config\Routes.php) PHP Code: /** The root of admin works well, so if I try to access the home works. Doing http://myurl.com/admin or http://myurl.com/admin/index What I don't understand is why http://myurl.com/admin/login won't work, I'm just calling one of the methods inside the Home controller in admin. I always get the following error Code: 404 - File Not Found Debugging that I get Code: string(34) "\Modules\Lobby\Controllers\Admin" string(5) "login" Clearly it's not finding Admin::login because the namespace is wrong, but all that is set on Routes.php config file. Two clarifications:
|
Messages In This Thread |
Routing and modules - by lucky - 11-24-2020, 12:33 AM
RE: Routing and modules - by InsiteFX - 11-24-2020, 06:52 PM
RE: Routing and modules - by lucky - 11-25-2020, 12:29 AM
RE: Routing and modules - by InsiteFX - 11-25-2020, 03:46 PM
RE: Routing and modules - by lucky - 11-26-2020, 12:20 AM
RE: Routing and modules - by InsiteFX - 11-26-2020, 03:04 AM
RE: Routing and modules - by lucky - 11-26-2020, 09:57 AM
RE: Routing and modules - by InsiteFX - 11-26-2020, 12:11 PM
|