wip
This commit is contained in:
1 parent
21bfa6ecc3
commit
4bce04cd64
2 files changed
+7
-45
No files matched your search
@@ -3,7 +3,6 @@
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use App\Actions\LoadStatisticFixturesLeaguesOptions;
|
||||
use App\Models\CompetitionGroup;
|
||||
use App\Models\Element;
|
||||
use App\Models\StatisticFixtures;
|
||||
use BackedEnum;
|
||||
@@ -38,7 +37,10 @@ class Statistic extends BaseDashboard
|
||||
->preload()
|
||||
->searchable()
|
||||
->live()
|
||||
->label('League'),
|
||||
->label('League')
|
||||
->afterStateUpdated(function (callable $set) {
|
||||
$set('team_id', null);
|
||||
}),
|
||||
Select::make('team_id')
|
||||
->prefixIcon('icon-team')
|
||||
->options(function (Get $get) {
|
||||
@@ -67,13 +69,9 @@ class Statistic extends BaseDashboard
|
||||
Select::make('palyer_id')
|
||||
->label('Player')
|
||||
->prefixIcon('icon-player')
|
||||
->options(function () {
|
||||
$res = StatisticFixtures::where('sport_id', 1)
|
||||
->groupBy('league_id')
|
||||
->pluck('league_id')->toArray();
|
||||
|
||||
return CompetitionGroup::query()->whereIn('id', $res)->orderBy('name')->pluck('name', 'id');
|
||||
})
|
||||
->options([
|
||||
'draft' => 'Sep Maier',
|
||||
])
|
||||
->preload()
|
||||
->searchable()
|
||||
->live(),
|
||||
|
||||
Reference in new issue
Block a user