According this tutorial I try to implement access control for logged users but without success. It throws me an error but I dont understand what is wrong. Error says Setting unknown property: yii\filters\AccessRule::0 in vendor\yiisoft\yii2\base\Component.php
It seems there is missing key or name for some property. But its like on the video.
public function behaviors()
{
return [
'access' => [
'class' => AccessControl::class,
'only' => ['create', 'update', 'delete'],
'rules' => [
'actions' => ['create', 'update', 'delete'],
'allow' => true,
'roles' => ['@']
]
],
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}