Can';t在Yii2中获取从视图传递到控制器的参数

Can';t在Yii2中获取从视图传递到控制器的参数,yii2,yii2-advanced-app,Yii2,Yii2 Advanced App,我正在通过单击按钮将表单的值($model->stop)传递给控制器操作(search2)。但我无法在控制器中获取该值 视图: 错误: Bad Request (#400) Missing required parameters: id The above error occurred while the Web server was processing your request. Please contact us if you think this is a

我正在通过单击按钮将表单的值($model->stop)传递给控制器操作(search2)。但我无法在控制器中获取该值

视图:

错误:

    Bad Request (#400)
    Missing required parameters: id
    The above error occurred while the Web server was processing your request.
    Please contact us if you think this is a server error. Thank you.
帮我解决这个问题。

你所有的代码似乎都是正确的, 我认为问题在于$model->stop value

$model->stop  // value might be null  --null value also gives missing parameter error
请检查。

您的所有代码似乎都正确, 我认为问题在于$model->stop value

$model->stop  // value might be null  --null value also gives missing parameter error

请检查。

什么类型的变量是
$model->stop
,在UrlManager中是否有任何用于此操作的Url规则?$model->stop是一个整数值。未定义Url规则。请检查是否正确创建了链接。然后尝试从浏览器的地址栏手动使用参数访问此操作。好的。谢谢Bizley。什么类型的变量是
$model->stop
,并且您在UrlManager中对此操作有任何Url规则吗?$model->stop是一个整数值。没有定义Url规则。请检查是否正确创建了链接。然后尝试从浏览器的地址栏手动使用参数访问此操作。好的。谢谢Bizley。
$model->stop  // value might be null  --null value also gives missing parameter error