where('league_id','=',$league_id)->get(); return sizeof($members); } public static function getNames() { $season = Season::getCurrent(); $leagues = League::where('season_id','=',$season->id)->orderBy('rank')->orderBy('name')->get(); $leagueNames = array(); foreach($leagues as $league) { $leagueNames[$league->id] = $league->name; } return $leagueNames; } public static function getStartRoundId($leagueId) { $league = League::where('id','=',$leagueId)->first(); return $league->start_round_id; } }