basic comparatore completed
This commit is contained in:
1 parent
cbdc6aff47
commit
16cc214db6
80 files changed
+2413
-2794
No files matched your search
@@ -9,46 +9,38 @@ class ColumnTq extends Column
|
||||
{
|
||||
protected string $view = 'filament.tables.columns.column-tq';
|
||||
|
||||
protected ?array $multiline;
|
||||
protected $data;
|
||||
|
||||
protected ?array $fumetto;
|
||||
protected ?array $bookmakers;
|
||||
|
||||
protected ?bool $has_odds;
|
||||
protected ?bool $has_data;
|
||||
|
||||
public function loadData($record, $multiline_client)
|
||||
public function bookmakers(?array $bookmakers): static
|
||||
{
|
||||
$this->bookmakers = $bookmakers;
|
||||
|
||||
$res = OddsQualify::with('bookmaker')->where('event_id', $record->id)->get();
|
||||
|
||||
$this->fumetto = [];
|
||||
|
||||
$this->multiline = [];
|
||||
|
||||
foreach ($res as $item) {
|
||||
|
||||
$this->fumetto[] = $item;
|
||||
foreach ($multiline_client as $slot => $bookmaker) {
|
||||
if ($item->bookmaker_id == $bookmaker->bookmaker_id) {
|
||||
$this->multiline[$slot] = $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->has_odds = count($this->multiline) ? true : false;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getData(): ?array
|
||||
public function getBookmaker(): ?array
|
||||
{
|
||||
return $this->multiline;
|
||||
return $this->bookmakers;
|
||||
}
|
||||
|
||||
public function getFumetto()
|
||||
public function loadData($record)
|
||||
{
|
||||
return $this->fumetto;
|
||||
$this->data = OddsQualify::with('bookmaker')->where('event_id', $record->id)->get();
|
||||
|
||||
$this->has_data = count($this->data) ? true : false;
|
||||
}
|
||||
|
||||
public function hasodds()
|
||||
public function getData()
|
||||
{
|
||||
return $this->has_odds;
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
public function hasData()
|
||||
{
|
||||
return $this->has_data;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user