comparatore bookmaker odds wip
This commit is contained in:
1 parent
adaec7b3dc
commit
218c1e6e1c
59 files changed
+470
-129
No files matched your search
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Multilines\Schemas;
|
||||
|
||||
use App\Models\Bettype;
|
||||
use App\Models\Bookmaker;
|
||||
use App\Models\Matchpart;
|
||||
use App\Models\Sport;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class MultilineForm
|
||||
{
|
||||
public static $bettypes = [1, 2, 3, 4, 16, 2001, 2002, 2021, 3001, 3002, 3021];
|
||||
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Select::make('sport_id')
|
||||
->live()
|
||||
->options(Sport::where('is_active', 1)->pluck('name', 'id'))
|
||||
->preload(),
|
||||
Select::make('matchpart_id')
|
||||
->options(Matchpart::where('is_active', 1)->pluck('name', 'id'))
|
||||
->preload(),
|
||||
Select::make('bettype_id')
|
||||
->options(fn (Get $get) => Bettype::where('sport_id', $get('sport_id'))->whereIn('bettype_id', self::$bettypes)->pluck('name', 'bettype_id')),
|
||||
Select::make('bookmaker_id')
|
||||
->options(Bookmaker::where('is_active', 1)->pluck('name', 'txid'))
|
||||
->preload()
|
||||
->searchable(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user