Код: Выделить всё
public function actionDelete($id)
{
$ev = new Events();
if ( $this->findModel($id)->updateAttributes(['basket'=> '1'])) {
$ev->content = 'Удаление организации:' . trim(Yii::$app->user->identity->surname);
$ev->company_id = $this->id;
$ev->save();
}
return $this->redirect(['index',
]);
}