Answer the question
In order to leave comments, you need to log in
How to make a notification when the status changes?
How to change stouts in one controller. Let's say the admin assigned an order to the designer, then the designer should receive a notification that a new order has appeared.
In frontend/views/layouts/main.php I have already specified the widget
use yii\bootstrap\Alert;
<?= Alert::widget() ?>
if ($model->status == 3) {
Yii::$app->session->addFlash('success', 'Получили новый заказ');
}
Answer the question
In order to leave comments, you need to log in
If you plan to make alerts via flash messages, then you should not only write it down but also read it. You can read more about working with flash messages here.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question