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:
<?php
return 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?
It looks like you're new here. If you want to get involved, click one of these buttons!