Hello friends
it is possible to configure the method validation in the segment type route.
For example, I need my route to only accept POST methods.
My route is like this
'router' => [
'routes' => [
'cargo' => [
'type' => Segment::class,
'options' => [
'route' => '/cargo[/:action[/:id]]',
'constraints' => [
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]+',
],
'defaults' => [
'controller' => Controller\CargoController::class,
'action' => 'index',
],
],
],
],
],
Tks