<small><i class="fa fa-clock-o"></i> 5 mins</small> </h4> <p> đã gửi cho bạn một tin nhắn</p> </a> </li>'; } } ?> </ul> </li> <li class="footer"><a href="#">Xem tất cả</a></li> </ul> </li> <?php $listPostNotify = \common\models\PostNotification::find()->where(['receiver_id' => Yii::$app->user->getId()])->limit(20)->orderBy('status')->asArray()->all(); $newPostNotifyCount = \common\models\PostNotification::find()->where(['receiver_id' => Yii::$app->user->getId(), 'status' => 0])->count(); ?> <li class="notify_post dropdown notifications-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-bell-o"></i> <span class="notify_post_count label label-warning"><?php if ($newPostNotifyCount > 0) { echo $newPostNotifyCount; } ?> </span> </a> <ul class="dropdown-menu"> <li class="header">Bạn có <?php echo $newPostNotifyCount; ?>