user()->bookmaker_id); $this->bookmakers = $bookmakers; return $this; } public function getBookmaker(): ?array { return $this->bookmakers; } public function loadData($record) { $this->has_data = count($record->odds_dc) ? true : false; $this->act = $record->odds_dc->where('bookmaker_id', auth()->user()->bookmaker_id)->first(); $this->max['dc1x'] = $record->odds_dc->max('dc1x'); $this->max['dc12'] = $record->odds_dc->max('dc12'); $this->max['dcx2'] = $record->odds_dc->max('dcx2'); $this->min['dc1x'] = $record->odds_dc->min('dc1x'); $this->min['dc12'] = $record->odds_dc->min('dc12'); $this->min['dcx2'] = $record->odds_dc->min('dcx2'); } public function getAct() { return $this->act; } public function getMax() { return $this->max; } public function getMin() { return $this->min; } public function hasData() { return $this->has_data; } }