Answer the question
In order to leave comments, you need to log in
Why does not change the given data?
I have implemented a notification system, only on the local computer everything works fine and the notification closes without problems, but when I uploaded it to the hosting, I ran into such a problem that when I closed the notification, it stopped closing, although the same code is used. And here it is not clear what is the reason.
There is a link in the template
echo Html::a($notif.'<br>', ['notification/notification', 'id' => $notification->id_zakaz]);
public function actionNotification($id)
{
$model = $this->findModel(['id_zakaz' => $id]);
$model->active = 0;
$model->save();
return $this->redirect(['zakaz/view', 'id' => $id]);
}
Answer the question
In order to leave comments, you need to log in
most likely you have validation errors in the model. Display them with $model->getErrors() and fix them further
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question