V
V
Vladislav2020-06-05 15:30:36
Yii
Vladislav, 2020-06-05 15:30:36

How to correctly build a CNC rule in Yii2?

I have a module. Panel
at the address /panel
it has a Task controller
already at the address /panel/task
and the action New
the address has become /panel/task/new
two parameters are passed to the action task get
network and service
the address is obtained:
/panel/task/new/?network= a&service=b

Tell me how to make a link like:
/panel/task/new/a/b
My unsuccessful attempts:

'panel/task/new/<network:\d+>/<service:\d+>' => '<Module>/task/new',

'panel/task/new/<network:\d+>/<service:\d+>' => 'panel/task/new',

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav, 2020-06-05
@cr1gger

Moron! Delete this post....
The error was in regular expressions. Specified \d, but you need \w

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question