As a novice, I keep struggling with the Routes.php. I am building an app with several forms (ie. website, hardware, software, contact) and I want each form to have its own controller (same names, ie. website, hardware, software, contact).
For some reasons the controller 'website' is prepended to every controller/action combination I refer to. This is my current Routes.php:
<?phpreturn array( '_root_' => 'website/home', // The default route 'website/hardware(/:any)' => 'hardware/$1', 'website/software(/:any)' => 'software/$1', 'website/contact(/:any)' => 'contact/$1', );
What is the right way to do this?
The first time I click on this link, I'm routed to /website/hardware, which is OK.
The second time I click on this link, I'm routed to /website/website/hardware, which is NOK
Yep, this works. Thx.
It looks like you're new here. If you want to get involved, click one of these buttons!