diff --git a/app/Filament/Widgets/PlayerPropsDrop.php b/app/Filament/Widgets/PlayerPropsDrop.php index 7484b7b7..26495afe 100644 --- a/app/Filament/Widgets/PlayerPropsDrop.php +++ b/app/Filament/Widgets/PlayerPropsDrop.php @@ -389,7 +389,7 @@ class PlayerPropsDrop extends Widget $team_home_away = 'away'; } - $player_totals = SofaScorePlayerPerSeason::with('details')->where('total_min', '>', 0)->where('season', 'last_180_days')->where('ss_team_id', $team_id)->get(); + $player_totals = SofaScorePlayerPerSeason::with('details')->where('total_min', '>', 0)->where('season', 'total')->where('ss_team_id', $team_id)->get(); $count_player = 0; $tmp = []; @@ -682,11 +682,9 @@ class PlayerPropsDrop extends Widget public function prepareLineUp() { $players = SofaScorePlayerPerSeason::with('details')->where('total_min', '>', 0)->where('season', 'last_180_days')->where('ss_team_id', $this->team_id)->get(); + $arr = collect(); foreach ($players as $value) { - if ($value->details->player_name == 'Thomas de Martis') { - dd($value); - } if ($value?->details->position ?? 0) { $arr->push([ 'id' => $value->ss_player_id, diff --git a/app/Livewire/PlayerCalculator.php b/app/Livewire/PlayerCalculator.php index 383520cc..5ef9401c 100644 --- a/app/Livewire/PlayerCalculator.php +++ b/app/Livewire/PlayerCalculator.php @@ -12,7 +12,8 @@ class PlayerCalculator extends Component { $positions_map = LoadPositions::load(); - $player = SofaScorePlayerPerSeason::with('details')->where('total_min', '>', 0)->where('season', 'last_180_days')->where('ss_team_id', $team_id)->get(); + $player = SofaScorePlayerPerSeason::with('details')->where('season', 'total')->where('ss_team_id', $team_id)->get(); + $result = []; foreach ($player as $val) { if ($val->details != null && $val->details->is_active) {