public function has() { $usersId = $this->session->get('identity'); if (!$usersId) { return false; } $number = ActivityNotifications::count(['users_id = ?0 AND was_read = "N"', 'bind' => [$usersId]]); return $number > 0; }