From 40d97327d4dff680c4f7c0434a004ec2fd823956 Mon Sep 17 00:00:00 2001 From: salam Date: Sun, 4 Jan 2026 06:29:11 +0100 Subject: [PATCH] db and query optimization compl --- app/Console/Commands/Grapper/TxOdds/Odds.php | 2 +- .../Resources/Events/EventResource.php | 28 +++++++++- app/Filament/Tables/Columns/Column3way.php | 28 +++------- app/Filament/Tables/Columns/ColumnDc.php | 28 +++------- app/Filament/Tables/Columns/ColumnDnb.php | 24 +++----- app/Filament/Tables/Columns/ColumnGgng.php | 24 +++----- app/Filament/Tables/Columns/ColumnTotal.php | 24 +++----- app/Filament/Tables/Columns/ColumnTq.php | 24 +++----- app/Models/Event.php | 55 +++++++++++++++++++ app/Models/{OddsQualify.php => OddsTq.php} | 4 +- ...11_08_053430_create_odds_qualify_table.php | 4 +- database/seeders/MultilineSettingSeeder.php | 2 +- .../tables/columns/column-dc.blade.php | 2 +- .../tables/columns/column-dnb.blade.php | 2 +- .../tables/columns/column-ggng.blade.php | 2 +- .../tables/columns/column-total.blade.php | 2 +- .../tables/columns/column-tq.blade.php | 2 +- .../tables/columns/column_3way.blade.php | 2 +- .../columns/fumetto/fumetto_1x2.blade.php | 2 +- .../columns/fumetto/fumetto_dc.blade.php | 2 +- .../columns/fumetto/fumetto_dnb.blade.php | 2 +- .../columns/fumetto/fumetto_ggng.blade.php | 2 +- .../columns/fumetto/fumetto_total.blade.php | 2 +- .../columns/fumetto/fumetto_tq.blade.php | 2 +- 24 files changed, 145 insertions(+), 126 deletions(-) rename app/Models/{OddsQualify.php => OddsTq.php} (91%) diff --git a/app/Console/Commands/Grapper/TxOdds/Odds.php b/app/Console/Commands/Grapper/TxOdds/Odds.php index 9de281b4..8d15d652 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds.php @@ -64,7 +64,7 @@ class Odds 262148 TOTALS OVER TIME 11534337 GG/NG (both teams to score) 5242880 DOUBLE CHANCE - 7340033 TO PROGRESS (to_qualify) + 7340033 TO PROGRESS (to qualify) 6291457 DRAW NO BET Not used: diff --git a/app/Filament/Resources/Events/EventResource.php b/app/Filament/Resources/Events/EventResource.php index 149f3f30..38577aaa 100644 --- a/app/Filament/Resources/Events/EventResource.php +++ b/app/Filament/Resources/Events/EventResource.php @@ -52,7 +52,31 @@ class EventResource extends Resource public static function getEloquentQuery(): Builder { - return parent::getEloquentQuery() - ->where('starttime', '>', Carbon::now()); + $query = parent::getEloquentQuery() + ->where('starttime', '>', Carbon::now()) + ->with('competition_group') + ->with('country') + ->with('home') + ->with('away'); + if (in_array(1, EventsTable::$bettype_settings)) { + $query->with('odds_3way.bookmaker'); + } + if (in_array(2, EventsTable::$bettype_settings)) { + $query->with('odds_dc.bookmaker'); + } + if (in_array(3, EventsTable::$bettype_settings)) { + $query->with('odds_dnb.bookmaker'); + } + if (in_array(4, EventsTable::$bettype_settings)) { + $query->with('odds_ggng.bookmaker'); + } + if (in_array(5, EventsTable::$bettype_settings)) { + $query->with('odds_tq.bookmaker'); + } + if (in_array(6, EventsTable::$bettype_settings)) { + $query->with('odds_total.bookmaker'); + } + + return $query; } } diff --git a/app/Filament/Tables/Columns/Column3way.php b/app/Filament/Tables/Columns/Column3way.php index 5255020a..a12059a1 100644 --- a/app/Filament/Tables/Columns/Column3way.php +++ b/app/Filament/Tables/Columns/Column3way.php @@ -2,15 +2,12 @@ namespace App\Filament\Tables\Columns; -use App\Models\Odds3way; use Filament\Tables\Columns\Column; class Column3way extends Column { protected string $view = 'filament.tables.columns.column_3way'; - protected $data; - protected ?array $max; protected ?array $min; @@ -33,26 +30,19 @@ class Column3way extends Column public function loadData($record) { - $this->data = Odds3way::with('bookmaker')->where('event_id', $record->id)->get(); + $this->max['h3w'] = $record->odds_3way->max('h3w'); + $this->min['h3w'] = $record->odds_3way->min('h3w'); - $this->max['h3w'] = $this->data->max('h3w'); - $this->min['h3w'] = $this->data->min('h3w'); + $this->max['d3w'] = $record->odds_3way->max('d3w'); + $this->min['d3w'] = $record->odds_3way->min('d3w'); - $this->max['d3w'] = $this->data->max('d3w'); - $this->min['d3w'] = $this->data->min('d3w'); + $this->max['a3w'] = $record->odds_3way->max('a3w'); + $this->min['a3w'] = $record->odds_3way->min('a3w'); - $this->max['a3w'] = $this->data->max('a3w'); - $this->min['a3w'] = $this->data->min('a3w'); + $this->max['margin'] = $record->odds_3way->max('margin'); + $this->min['margin'] = $record->odds_3way->min('margin'); - $this->max['margin'] = $this->data->max('margin'); - $this->min['margin'] = $this->data->min('margin'); - - $this->has_data = count($this->data) ? true : false; - } - - public function getData() - { - return $this->data; + $this->has_data = count($record->odds_3way) ? true : false; } public function getMax() diff --git a/app/Filament/Tables/Columns/ColumnDc.php b/app/Filament/Tables/Columns/ColumnDc.php index cfeba355..bb9e094c 100644 --- a/app/Filament/Tables/Columns/ColumnDc.php +++ b/app/Filament/Tables/Columns/ColumnDc.php @@ -2,7 +2,6 @@ namespace App\Filament\Tables\Columns; -use App\Models\OddsDc; use Filament\Tables\Columns\Column; class ColumnDc extends Column @@ -13,8 +12,6 @@ class ColumnDc extends Column protected ?array $min; - protected $data; - protected ?array $bookmakers; protected ?bool $has_data; @@ -33,26 +30,19 @@ class ColumnDc extends Column public function loadData($record) { - $this->data = OddsDc::with('bookmaker')->where('event_id', $record->id)->get(); + $this->max['dc1x'] = $record->odds_dc->max('dc1x'); + $this->min['dc1x'] = $record->odds_dc->min('dc1x'); - $this->max['dc1x'] = $this->data->max('dc1x'); - $this->min['dc1x'] = $this->data->min('dc1x'); + $this->max['dc12'] = $record->odds_dc->max('dc12'); + $this->min['dc12'] = $record->odds_dc->min('dc12'); - $this->max['dc12'] = $this->data->max('dc12'); - $this->min['dc12'] = $this->data->min('dc12'); + $this->max['dcx2'] = $record->odds_dc->max('dcx2'); + $this->min['dcx2'] = $record->odds_dc->min('dcx2'); - $this->max['dcx2'] = $this->data->max('dcx2'); - $this->min['dcx2'] = $this->data->min('dcx2'); + $this->max['margin'] = $record->odds_dc->max('margin'); + $this->min['margin'] = $record->odds_dc->min('margin'); - $this->max['margin'] = $this->data->max('margin'); - $this->min['margin'] = $this->data->min('margin'); - - $this->has_data = count($this->data) ? true : false; - } - - public function getData() - { - return $this->data; + $this->has_data = count($record->odds_dc) ? true : false; } public function getMax() diff --git a/app/Filament/Tables/Columns/ColumnDnb.php b/app/Filament/Tables/Columns/ColumnDnb.php index 6a5c67bd..d7ce931a 100644 --- a/app/Filament/Tables/Columns/ColumnDnb.php +++ b/app/Filament/Tables/Columns/ColumnDnb.php @@ -2,7 +2,6 @@ namespace App\Filament\Tables\Columns; -use App\Models\OddsDnb; use Filament\Tables\Columns\Column; class ColumnDnb extends Column @@ -13,8 +12,6 @@ class ColumnDnb extends Column protected ?array $min; - protected $data; - protected ?array $bookmakers; protected ?bool $has_data; @@ -33,23 +30,16 @@ class ColumnDnb extends Column public function loadData($record) { - $this->data = OddsDnb::with('bookmaker')->where('event_id', $record->id)->get(); + $this->max['dnb1'] = $record->odds_dnb->max('dnb1'); + $this->min['dnb1'] = $record->odds_dnb->min('dnb1'); - $this->max['dnb1'] = $this->data->max('dnb1'); - $this->min['dnb1'] = $this->data->min('dnb1'); + $this->max['dnb2'] = $record->odds_dnb->max('dnb2'); + $this->min['dnb2'] = $record->odds_dnb->min('dnb2'); - $this->max['dnb2'] = $this->data->max('dnb2'); - $this->min['dnb2'] = $this->data->min('dnb2'); + $this->max['margin'] = $record->odds_dnb->max('margin'); + $this->min['margin'] = $record->odds_dnb->min('margin'); - $this->max['margin'] = $this->data->max('margin'); - $this->min['margin'] = $this->data->min('margin'); - - $this->has_data = count($this->data) ? true : false; - } - - public function getData() - { - return $this->data; + $this->has_data = count($record->odds_dnb) ? true : false; } public function getMax() diff --git a/app/Filament/Tables/Columns/ColumnGgng.php b/app/Filament/Tables/Columns/ColumnGgng.php index bf78d208..7a24900e 100644 --- a/app/Filament/Tables/Columns/ColumnGgng.php +++ b/app/Filament/Tables/Columns/ColumnGgng.php @@ -2,7 +2,6 @@ namespace App\Filament\Tables\Columns; -use App\Models\OddsGgng; use Filament\Tables\Columns\Column; class ColumnGgng extends Column @@ -13,8 +12,6 @@ class ColumnGgng extends Column protected ?array $min; - protected $data; - protected ?array $bookmakers; protected ?bool $has_data; @@ -33,23 +30,16 @@ class ColumnGgng extends Column public function loadData($record) { - $this->data = OddsGgng::with('bookmaker')->where('event_id', $record->id)->get(); + $this->max['gg'] = $record->odds_ggng->max('gg'); + $this->min['gg'] = $record->odds_ggng->min('gg'); - $this->max['gg'] = $this->data->max('gg'); - $this->min['gg'] = $this->data->min('gg'); + $this->max['ng'] = $record->odds_ggng->max('ng'); + $this->min['ng'] = $record->odds_ggng->min('ng'); - $this->max['ng'] = $this->data->max('ng'); - $this->min['ng'] = $this->data->min('ng'); + $this->max['margin'] = $record->odds_ggng->max('margin'); + $this->min['margin'] = $record->odds_ggng->min('margin'); - $this->max['margin'] = $this->data->max('margin'); - $this->min['margin'] = $this->data->min('margin'); - - $this->has_data = count($this->data) ? true : false; - } - - public function getData() - { - return $this->data; + $this->has_data = count($record->odds_ggng) ? true : false; } public function getMax() diff --git a/app/Filament/Tables/Columns/ColumnTotal.php b/app/Filament/Tables/Columns/ColumnTotal.php index 48bff6d8..9e623e9c 100644 --- a/app/Filament/Tables/Columns/ColumnTotal.php +++ b/app/Filament/Tables/Columns/ColumnTotal.php @@ -2,7 +2,6 @@ namespace App\Filament\Tables\Columns; -use App\Models\OddsTotal; use Filament\Tables\Columns\Column; class ColumnTotal extends Column @@ -13,8 +12,6 @@ class ColumnTotal extends Column protected ?array $min; - protected $data; - protected ?array $bookmakers; protected ?bool $has_data; @@ -33,23 +30,16 @@ class ColumnTotal extends Column public function loadData($record) { - $this->data = OddsTotal::with('bookmaker')->where('event_id', $record->id)->get(); + $this->max['over'] = $record->odds_total->max('over'); + $this->min['over'] = $record->odds_total->min('over'); - $this->max['over'] = $this->data->max('over'); - $this->min['over'] = $this->data->min('over'); + $this->max['under'] = $record->odds_total->max('under'); + $this->min['under'] = $record->odds_total->min('under'); - $this->max['under'] = $this->data->max('under'); - $this->min['under'] = $this->data->min('under'); + $this->max['margin'] = $record->odds_total->max('margin'); + $this->min['margin'] = $record->odds_total->min('margin'); - $this->max['margin'] = $this->data->max('margin'); - $this->min['margin'] = $this->data->min('margin'); - - $this->has_data = count($this->data) ? true : false; - } - - public function getData() - { - return $this->data; + $this->has_data = count($record->odds_total) ? true : false; } public function getMax() diff --git a/app/Filament/Tables/Columns/ColumnTq.php b/app/Filament/Tables/Columns/ColumnTq.php index a0b99445..be3f4791 100644 --- a/app/Filament/Tables/Columns/ColumnTq.php +++ b/app/Filament/Tables/Columns/ColumnTq.php @@ -2,7 +2,6 @@ namespace App\Filament\Tables\Columns; -use App\Models\OddsQualify; use Filament\Tables\Columns\Column; class ColumnTq extends Column @@ -13,8 +12,6 @@ class ColumnTq extends Column protected ?array $min; - protected $data; - protected ?array $bookmakers; protected ?bool $has_data; @@ -33,23 +30,16 @@ class ColumnTq extends Column public function loadData($record) { - $this->data = OddsQualify::with('bookmaker')->where('event_id', $record->id)->get(); + $this->max['htq'] = $record->odds_tq->max('htq'); + $this->min['htq'] = $record->odds_tq->min('htq'); - $this->max['htq'] = $this->data->max('htq'); - $this->min['htq'] = $this->data->min('htq'); + $this->max['atq'] = $record->odds_tq->max('atq'); + $this->min['atq'] = $record->odds_tq->min('atq'); - $this->max['atq'] = $this->data->max('atq'); - $this->min['atq'] = $this->data->min('atq'); + $this->max['margin'] = $record->odds_tq->max('margin'); + $this->min['margin'] = $record->odds_tq->min('margin'); - $this->max['margin'] = $this->data->max('margin'); - $this->min['margin'] = $this->data->min('margin'); - - $this->has_data = count($this->data) ? true : false; - } - - public function getData() - { - return $this->data; + $this->has_data = count($record->odds_tq) ? true : false; } public function getMax() diff --git a/app/Models/Event.php b/app/Models/Event.php index 26f80317..5ca6b781 100644 --- a/app/Models/Event.php +++ b/app/Models/Event.php @@ -67,4 +67,59 @@ class Event extends Model { return $this->belongsTo(Element::class); } + + public function odds_2way() + { + return $this->hasMany(Odds2way::class); + } + + public function odds_2way_s1() + { + return $this->hasMany(Odds2wayS1::class); + } + + public function odds_3way() + { + return $this->hasMany(Odds3way::class); + } + + public function odds_dc() + { + return $this->hasMany(OddsDc::class); + } + + public function odds_dnb() + { + return $this->hasMany(OddsDnb::class); + } + + public function odds_ggng() + { + return $this->hasMany(OddsGgng::class); + } + + public function odds_handicap() + { + return $this->hasMany(OddsHandicap::class); + } + + public function odds_handicap_q1() + { + return $this->hasMany(OddsHandicapQ1::class); + } + + public function odds_total() + { + return $this->hasMany(OddsTotal::class); + } + + public function odds_total_q1() + { + return $this->hasMany(OddsTotalQ1::class); + } + + public function odds_tq() + { + return $this->hasMany(OddsTq::class); + } } diff --git a/app/Models/OddsQualify.php b/app/Models/OddsTq.php similarity index 91% rename from app/Models/OddsQualify.php rename to app/Models/OddsTq.php index 68fe9339..51c70932 100644 --- a/app/Models/OddsQualify.php +++ b/app/Models/OddsTq.php @@ -4,9 +4,9 @@ namespace App\Models; use Illuminate\Database\Eloquent\Model; -class OddsQualify extends Model +class OddsTq extends Model { - protected $table = 'odds_qualify'; + protected $table = 'odds_tq'; protected $fillable = [ 'id', diff --git a/database/migrations/2024_11_08_053430_create_odds_qualify_table.php b/database/migrations/2024_11_08_053430_create_odds_qualify_table.php index e02c54cc..7a191cdc 100644 --- a/database/migrations/2024_11_08_053430_create_odds_qualify_table.php +++ b/database/migrations/2024_11_08_053430_create_odds_qualify_table.php @@ -11,7 +11,7 @@ return new class extends Migration */ public function up(): void { - Schema::create('odds_qualify', function (Blueprint $table) { + Schema::create('odds_tq', function (Blueprint $table) { $table->id(); $table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events'); $table->integer('sport_id')->index()->references('id')->on('sports'); @@ -33,6 +33,6 @@ return new class extends Migration */ public function down(): void { - Schema::dropIfExists('odds_qualify'); + Schema::dropIfExists('odds_tq'); } }; diff --git a/database/seeders/MultilineSettingSeeder.php b/database/seeders/MultilineSettingSeeder.php index 672a18e3..0067b671 100644 --- a/database/seeders/MultilineSettingSeeder.php +++ b/database/seeders/MultilineSettingSeeder.php @@ -18,7 +18,7 @@ class MultilineSettingSeeder extends Seeder (2, 1, 'DOUBLE CHANCE', 'DC', 'odds_dc', 4, 1, '2025-12-14 09:31:22', '2025-12-14 09:32:55'), (3, 1, 'DRAW NO BET', 'DNB', 'odds_dnb', 4, 0, '2025-12-14 09:31:42', '2025-12-14 09:31:42'), (4, 1, 'GOAL NO GOAL', 'GGNG', 'odds_ggng', 4, 0, '2025-12-14 09:31:56', '2025-12-14 09:31:56'), - (5, 1, 'TO QUALIFY', 'TQ', 'odds_qualify', 4, 0, '2025-12-14 09:32:19', '2025-12-14 09:32:19'), + (5, 1, 'TO QUALIFY', 'TQ', 'odds_tq', 4, 0, '2025-12-14 09:32:19', '2025-12-14 09:32:19'), (6, 1, 'TOTALS', 'OU', 'odds_totals', 4, 1, '2025-12-14 09:32:38', '2025-12-14 09:32:38'), (7, 3, 'MONEY LINE', 'ML', 'odds_2ways', 4, 0, '2025-12-14 09:37:32', '2025-12-14 09:37:32'), (8, 3, 'HANDICAP', 'HC', 'odds_handicaps', 4, 1, '2025-12-14 09:38:05', '2025-12-14 09:38:05'), diff --git a/resources/views/filament/tables/columns/column-dc.blade.php b/resources/views/filament/tables/columns/column-dc.blade.php index 1d560a06..91b9ed6b 100644 --- a/resources/views/filament/tables/columns/column-dc.blade.php +++ b/resources/views/filament/tables/columns/column-dc.blade.php @@ -11,7 +11,7 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['1X', '12', 'X2']]) @foreach ($getBookmaker() as $bookmaker_id) - @foreach ($getData() as $item) + @foreach ($record->odds_dc as $item) @if ($item->bookmaker_id == $bookmaker_id) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column-dnb.blade.php b/resources/views/filament/tables/columns/column-dnb.blade.php index b33172aa..cf46f7c5 100644 --- a/resources/views/filament/tables/columns/column-dnb.blade.php +++ b/resources/views/filament/tables/columns/column-dnb.blade.php @@ -11,7 +11,7 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['DNB1', 'DNB2']]) @foreach ($getBookmaker() as $bookmaker_id) - @foreach ($getData() as $item) + @foreach ($record->odds_dnb as $item) @if ($item->bookmaker_id == $bookmaker_id) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column-ggng.blade.php b/resources/views/filament/tables/columns/column-ggng.blade.php index b88db0ac..739a0581 100644 --- a/resources/views/filament/tables/columns/column-ggng.blade.php +++ b/resources/views/filament/tables/columns/column-ggng.blade.php @@ -11,7 +11,7 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['GG', 'NG']]) @foreach ($getBookmaker() as $bookmaker_id) - @foreach ($getData() as $item) + @foreach ($record->odds_ggng as $item) @if ($item->bookmaker_id == $bookmaker_id) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column-total.blade.php b/resources/views/filament/tables/columns/column-total.blade.php index 868d8190..446560a5 100644 --- a/resources/views/filament/tables/columns/column-total.blade.php +++ b/resources/views/filament/tables/columns/column-total.blade.php @@ -11,7 +11,7 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['O', 'U', 'T']]) @foreach ($getBookmaker() as $bookmaker_id) - @foreach ($getData() as $item) + @foreach ($record->odds_total as $item) @if ($item->bookmaker_id == $bookmaker_id) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column-tq.blade.php b/resources/views/filament/tables/columns/column-tq.blade.php index 50be3608..fb04330a 100644 --- a/resources/views/filament/tables/columns/column-tq.blade.php +++ b/resources/views/filament/tables/columns/column-tq.blade.php @@ -11,7 +11,7 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['H', 'A']]) @foreach ($getBookmaker() as $bookmaker_id) - @foreach ($getData() as $item) + @foreach ($record->odds_tq as $item) @if ($item->bookmaker_id == $bookmaker_id) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column_3way.blade.php b/resources/views/filament/tables/columns/column_3way.blade.php index 55b44c46..1d1333f0 100644 --- a/resources/views/filament/tables/columns/column_3way.blade.php +++ b/resources/views/filament/tables/columns/column_3way.blade.php @@ -11,7 +11,7 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']]) @foreach ($getBookmaker() as $bookmaker_id) - @foreach ($getData() as $item) + @foreach ($record->odds_3way as $item) @if ($item->bookmaker_id == $bookmaker_id) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/fumetto/fumetto_1x2.blade.php b/resources/views/filament/tables/columns/fumetto/fumetto_1x2.blade.php index 26df164a..be0b91d4 100644 --- a/resources/views/filament/tables/columns/fumetto/fumetto_1x2.blade.php +++ b/resources/views/filament/tables/columns/fumetto/fumetto_1x2.blade.php @@ -10,7 +10,7 @@ $min = $getMin(); @endphp - @foreach ($getData() as $item) + @foreach ($record->odds_3way as $item) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', diff --git a/resources/views/filament/tables/columns/fumetto/fumetto_dc.blade.php b/resources/views/filament/tables/columns/fumetto/fumetto_dc.blade.php index d1fabc4c..c9ba1dc3 100644 --- a/resources/views/filament/tables/columns/fumetto/fumetto_dc.blade.php +++ b/resources/views/filament/tables/columns/fumetto/fumetto_dc.blade.php @@ -10,7 +10,7 @@ $min = $getMin(); @endphp - @foreach ($getData() as $item) + @foreach ($record->odds_dc as $item) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', diff --git a/resources/views/filament/tables/columns/fumetto/fumetto_dnb.blade.php b/resources/views/filament/tables/columns/fumetto/fumetto_dnb.blade.php index 50fee743..75e84714 100644 --- a/resources/views/filament/tables/columns/fumetto/fumetto_dnb.blade.php +++ b/resources/views/filament/tables/columns/fumetto/fumetto_dnb.blade.php @@ -10,7 +10,7 @@ $min = $getMin(); @endphp - @foreach ($getData() as $item) + @foreach ($record->odds_dnb as $item) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', diff --git a/resources/views/filament/tables/columns/fumetto/fumetto_ggng.blade.php b/resources/views/filament/tables/columns/fumetto/fumetto_ggng.blade.php index b01fa602..8494a639 100644 --- a/resources/views/filament/tables/columns/fumetto/fumetto_ggng.blade.php +++ b/resources/views/filament/tables/columns/fumetto/fumetto_ggng.blade.php @@ -10,7 +10,7 @@ $min = $getMin(); @endphp - @foreach ($getData() as $item) + @foreach ($record->odds_ggng as $item) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', diff --git a/resources/views/filament/tables/columns/fumetto/fumetto_total.blade.php b/resources/views/filament/tables/columns/fumetto/fumetto_total.blade.php index 2915e35a..c8348077 100644 --- a/resources/views/filament/tables/columns/fumetto/fumetto_total.blade.php +++ b/resources/views/filament/tables/columns/fumetto/fumetto_total.blade.php @@ -10,7 +10,7 @@ $min = $getMin(); @endphp - @foreach ($getData() as $item) + @foreach ($record->odds_total as $item) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', diff --git a/resources/views/filament/tables/columns/fumetto/fumetto_tq.blade.php b/resources/views/filament/tables/columns/fumetto/fumetto_tq.blade.php index 06b0d8e1..095ab015 100644 --- a/resources/views/filament/tables/columns/fumetto/fumetto_tq.blade.php +++ b/resources/views/filament/tables/columns/fumetto/fumetto_tq.blade.php @@ -10,7 +10,7 @@ $min = $getMin(); @endphp - @foreach ($getData() as $item) + @foreach ($record->odds_tq as $item) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '',