Route passing $1 into the controller function instead of the value |
Routes are most flexible thing i have ever used
PHP 8.3 CI 4.6.0 PHP Code: $routes->get('{locale}/LoadEvents/(:any)', [FrontendController::class, 'LoadEvents/$1']); PHP Code: public function LoadEvents($id_1, $id_2): string 1. www.domain.com/en/LoadEvents/123/987 PHP Code: $id_1 string (3) "123" PHP Code: $id_2 string (3) "987" 2. www.domain.com/en/LoadEvents2/123/987/456/beekeeper/mnt-top PHP Code: $params array (5) (05-22-2025, 10:41 PM)InsiteFX Wrote: Correct, that was small L, not integer 1 |
Messages In This Thread |
Route passing $1 into the controller function instead of the value - by Alex.Fry - 05-22-2025, 12:09 AM
RE: Route passing $1 into the controller function instead of the value - by michalsn - 05-22-2025, 12:16 AM
RE: Route passing $1 into the controller function instead of the value - by Alex.Fry - 05-22-2025, 03:42 PM
RE: Route passing $1 into the controller function instead of the value - by michalsn - 05-22-2025, 10:35 PM
RE: Route passing $1 into the controller function instead of the value - by InsiteFX - 05-22-2025, 10:41 PM
RE: Route passing $1 into the controller function instead of the value - by davis.lasis - 05-22-2025, 11:32 PM
|