public function generateNextRoundsFights()
    {
        $fightersCount = $this->championship->competitors->count() + $this->championship->teams->count();
        $maxRounds = $this->getNumRounds($fightersCount);
        for ($numRound = 1; $numRound < $maxRounds; $numRound++) {
            $groupsByRound = $this->championship->fightersGroups()->where('round', $numRound)->with('parent', 'children')->get();
            $this->updateParentFight($groupsByRound); // should be groupsByRound
        }
    }
public function generateNextRoundsFights()
    {
        $fightersCount = $this->championship->competitors->count() + $this->championship->teams->count();
        $maxRounds = $this->getNumRounds($fightersCount);
        for ($numRound = 1; $numRound < $maxRounds; $numRound++) {
            $groupsByRound = $this->championship->fightersGroups()->where('round', $numRound)->with('parent', 'children')->get();
            $this->updateParentFight($groupsByRound); // should be groupsByRound
        }
    }
public function generateNextRoundsFights ( ) { $ fightersCount = $ this -> championship -> competitors -> count ( ) + $ this -> championship -> teams -> count ( ) ; $ maxRounds = $ this -> getNumRounds ( $ fightersCount ) ; for ( $ numRound = 1 ; $ numRound < $ maxRounds ; $ numRound ++ ) { $ groupsByRound = $ this -> championship -> fightersGroups ( ) -> where ( 'round' , $ numRound ) -> with ( 'parent' , 'children' ) -> get ( ) ; $ this -> updateParentFight ( $ groupsByRound ) ; // should be groupsByRound } }
Generate Fights for next rounds.
Generate Fights for next rounds .