diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index bb06915f..01af1925 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -8,6 +8,7 @@ use App\Filament\Widgets\MovingAverageChart; use App\Filament\Widgets\PunctualChart; use App\Models\Element; use App\Models\StatisticFixtures; +use App\Models\StatistikoDetail; use BackedEnum; use Filament\Actions\Action; use Filament\Forms\Components\DatePicker; @@ -69,6 +70,7 @@ class Statistic extends BaseDashboard }) ->preload() ->searchable() + ->live() ->label('Team'), DatePicker::make('start_date') ->native(false) @@ -98,6 +100,9 @@ class Statistic extends BaseDashboard ->prefixIcon('icon-player') ->preload() ->searchable() + ->options(function (Get $get) { + return StatistikoDetail::where('tm_player_id', $get('tm_player_id'))->pluck('name', 'id'); + }) ->live(), Select::make('team_position') ->prefixIcon('phosphor-map-pin')