public function getLastActivityAttribute()
    {
        $activity = $this->activity;
        return ($activity instanceof UserActivity) ?
                Carbon::createFromFormat('Y-m-d H:i:s', $activity->last_activity) : null;
    }