How can I move the literal part of the route to the end like this /:rubric-rb/[:page]
, i.e. how to tell the route plugin to match the literal part first? Or if I were to use the regex plugin how to make a part of the spec optional?
'rubric' => [
'type' => Segment::class,
'options' => [
'route' => '/rb-:rubric/[:page/]',
'constraints' => [
'rubric' => '[a-zA-Z0-9_-]+',
'page' => '[0-9]+',
],
'defaults' => [
'controller' => Controller\IndexController::class,
'action' => 'rubric',
],
],
],