public function _contests() { $today = date('Y-m-d'); $org = Organization::all(["live" => true], ["_id"]); foreach ($org as $o) { $contests = Contest::exists($o->_id, ['start' => $today, 'end' => $today, 'multiple' => true]); foreach ($contests as $c) { $this->_parseContest($c); } } }