config('env.txodds_betaid1'), 'other' => config('env.txodds_betaid2')]; $sport_map = Sport::getActiveSports(); Group::whereNotIn('sport_id', $sport_map)->delete(); $years = [date('y'), date('y') + 1]; foreach ($kontos as $konto => $authentication) { $url = 'https://xml2.txodds.com/feed/groups.php?' . $authentication . '&sid=' . implode(',', $years); // https://xml2.txodds.com/feed/groups.php?ident=betaid1&passwd=Dy59vpRC&sid=25 // // 181996 // FBARG // Supercopa Entre Rios // 26 // FBARG Supercopa Entre Rios-26 // 2025-12-13 00:00:00 // 2026-04-30 00:00:00 // $data = Xml::load($url); $count = 0; foreach ($data as $row) { $mgroup = $row->mgroup; $sport_id = MajorGroup::where('name', $mgroup)->value('sport_id'); if (in_array($sport_id, $sport_map)) { Group::updateOrCreate( ['id' => (int) $row->id], [ 'name' => (string) $row->name, 'fullname' => (string) $row->fullname, 'mgroup' => (string) $row->mgroup, 'sid' => (int) $row->sid, 'sport_id' => (int) $sport_id, 'date1' => (string) $row->date1, 'date2' => (string) $row->date2, ] ); $count++; } } Notice::note("$count groups $konto processed", 'g'); } } }