H
H
hollanditkzn2017-05-11 12:17:27
Yii
hollanditkzn, 2017-05-11 12:17:27

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() ?>

And in the designer's controller I display
if ($model->status == 3) {
            Yii::$app->session->addFlash('success', 'Получили новый заказ');
        }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2017-05-11
@hollanditkzn

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 question

Ask a Question

731 491 924 answers to any question