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_ggng) ? true : false; $this->act = $record->odds_ggng->where('bookmaker_id', auth()->user()->bookmaker_id)->first(); $this->max['gg'] = $record->odds_ggng->max('gg'); $this->max['ng'] = $record->odds_ggng->max('ng'); $this->min['gg'] = $record->odds_ggng->min('gg'); $this->min['ng'] = $record->odds_ggng->min('ng'); } 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; } }