How to send BaseHtml Form at url type controller/view/param1/param2 ?

Prompt how BaseHtml::beginForm(Url::toRoute(‘controller/view’), ‘post’)

send to the url: controller/view/param1/param2, where the parameters: param1, param2 will be processed according to the rule:

‘urlManager’ => [

......


'rules' => [


	'<controller>/<view>/<param1:\d+>/<param2:[\w-]+>' => "controller/view"


]

]