filters\VerbFilter $actions

$actions public property

This property defines the allowed request methods for each action. For each action that should only support limited set of request methods you add an entry with the action id as array key and an array of allowed methods (e.g. GET, HEAD, PUT) as the value. If an action is not listed all request methods are considered allowed.

You can use '*' to stand for all actions. When an action is explicitly specified, it takes precedence over the specification given by '*'.

For example,

[
  'create' => ['get', 'post'],
  'update' => ['get', 'put', 'post'],
  'delete' => ['post', 'delete'],
  '*' => ['get'],
]
public array $actions = []
doc_Yii
2016-10-30 17:02:47
Comments
Leave a Comment

Please login to continue.