public function scopeLastActive($query, $minutes = null)
    {
        $date = $this->freshTimestamp()->subMinutes(
            $minutes ?: config('laravel_auth.track-activity.minutes', 5)
        )->toDateTimeString();

        return $query->where('last_activity', '>=', $date);
    }