private function getFightersByEntity($fighters): Collection
    {
        // Right now, we are treating users and teams as equals.
        // It doesn't matter right now, because we only need name attribute which is common to both models

        // $this->groupBy contains federation_id, association_id, club_id, etc.
        if (($this->groupBy) != null) {
            return $fighters->groupBy($this->groupBy); // Collection of Collection
        }

        return $fighters->chunk(1); // Collection of Collection
    }
private function getFightersByEntity($fighters): Collection
    {
        // Right now, we are treating users and teams as equals.
        // It doesn't matter right now, because we only need name attribute which is common to both models

        // $this->groupBy contains federation_id, association_id, club_id, etc.
        if (($this->groupBy) != null) {
            return $fighters->groupBy($this->groupBy); // Collection of Collection
        }

        return $fighters->chunk(1); // Collection of Collection
    }
private function getFightersByEntity ( $ fighters ) : Collection { // Right now, we are treating users and teams as equals. // It doesn't matter right now, because we only need name attribute which is common to both models // $this->groupBy contains federation_id, association_id, club_id, etc. if ( ( $ this -> groupBy ) != null ) { return $ fighters -> groupBy ( $ this -> groupBy ) ; // Collection of Collection } return $ fighters -> chunk ( 1 ) ; // Collection of Collection }
Get Competitor's list ordered by entities
Countries for Internation Tournament, State for a National Tournament, etc.

@param $fighters

@return Collection
Get Competitor s list ordered by entities Countries for Internation Tournament State for a National Tournament etc .