yii2关闭验证

class ChannelController extends Controller
{
public $enableCsrfValidation = false;
/**
* {@inheritdoc}
*/
public function behaviors()
{
return [
‘verbs’ => [
‘class’ => VerbFilter::className(),
‘actions’ => [
‘delete’ => [‘POST’],
],
],
];

}
}

发表评论

电子邮件地址不会被公开。 必填项已用*标注