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