config('env.txodds_betaid1'), 'other' => config('env.txodds_betaid2')]; $sports = Sport::getActiveSports(); Group::whereNotIn('sport_id', $sports)->delete(); $years = [date('y'), date('y') + 1]; foreach ($kontos as $konto => $authentication) { $url = 'https://xml2.txodds.com/feed/groups.php?'.$authentication.'&sid='.implode(',', $years); $data = Xml::load($url); dd($data); $count = 0; foreach ($data as $row) { if (in_array()) { Group::updateOrCreate( ['id' => (int) $row->id], [ 'mgroup' => (string) $row->mgroup, 'name' => (string) $row->name, 'fullname' => (string) $row->fullname, 'sid' => (string) $row->sid, 'date1' => (string) $row->date1, 'date2' => (string) $row->date2, ] ); } $count++; } Notice::note("$count groups $konto processed", 'g'); } } }