fumetto max ok
This commit is contained in:
1 parent
9e7384daf8
commit
9c78f507f4
58 files changed
+672
-144
No files matched your search
@@ -9,6 +9,8 @@ class ColumnTotal extends Column
|
||||
{
|
||||
protected string $view = 'filament.tables.columns.column-total';
|
||||
|
||||
protected ?array $max;
|
||||
|
||||
protected $data;
|
||||
|
||||
protected ?array $bookmakers;
|
||||
@@ -31,6 +33,12 @@ class ColumnTotal extends Column
|
||||
{
|
||||
$this->data = OddsTotal::with('bookmaker')->where('event_id', $record->id)->get();
|
||||
|
||||
$this->max['over'] = $this->data->max('over');
|
||||
|
||||
$this->max['under'] = $this->data->max('under');
|
||||
|
||||
$this->max['margin'] = $this->data->max('margin');
|
||||
|
||||
$this->has_data = count($this->data) ? true : false;
|
||||
}
|
||||
|
||||
@@ -39,6 +47,11 @@ class ColumnTotal extends Column
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
public function getMax()
|
||||
{
|
||||
return $this->max;
|
||||
}
|
||||
|
||||
public function hasData()
|
||||
{
|
||||
return $this->has_data;
|
||||
|
||||
Reference in new issue
Block a user