public function actionIndex() { if (\Yii::$app->request->isAjax) { return $this->renderAjax('index', ['notifications' => Notification::getNotifications()]); } }
public function run() { $notifications = Notification::getNotifications(false); return $this->render('menu', ['notifications' => $notifications]); }