public function sortByField($field, $collection)
    {
        if ($collection->isEmpty()) {
            return 'N/A';
        }

        return $collection->groupBy($field)->sortByDesc(function ($logs) {
            return count($logs);
        })->first()->pluck($field)->first();
    }