I am trying to use routes.php to connect one route to another. The route I would like to connect is ‘/layouts/editspecial/:id’ I would like this route to go to my Layouts controller edit action, with arguments of id and true, in that order. The id is easy, but I’m unsure how to make the route pass true by default.
You can pass additional params in the route itself like this
'controller' => 'Pages',
'action' => 'display',
true //pass any additional param here
'id' => '[0-9]+',
'routeClass' => DashedRoute::class
When you use http://example.com/example/22 you’ll get