public function getLastActivityAgo() { $now = \Yii::$app->formatter->asTimestamp(time()); return (int) ($now - (int) $this->last_activity_at); }