How to setup a route for an optional second param? |
Do I need to setup two rules in the Routes.php for these two urls?
Code: 1) http://mydomain.example/show-list PHP Code: Rule 1) $routes->add('show-list', 'Home::index'); PHP Code: //HomeController.php If I have only this rule Code: $routes->add('show-list', 'Home::index'); If I have only this rule Code: $routes->add('show-list/(:any)', 'Home::index'); |
Messages In This Thread |
How to setup a route for an optional second param? - by happyape - 03-11-2019, 10:03 AM
RE: How to setup a route for an optional second param? - by devops - 03-13-2019, 01:08 PM
RE: How to setup a route for an optional second param? - by happyape - 03-18-2019, 01:32 AM
RE: How to setup a route for an optional second param? - by InsiteFX - 03-18-2019, 04:43 AM
|