diff --git a/app/Traits/PlayerProps/PlayerAspg.php b/app/Traits/PlayerProps/PlayerAspg.php index f816b56e..a879c576 100644 --- a/app/Traits/PlayerProps/PlayerAspg.php +++ b/app/Traits/PlayerProps/PlayerAspg.php @@ -4,6 +4,7 @@ namespace App\Traits\PlayerProps; use App\Models\StatisticFixtures; use App\Models\StatistikoDetail; +use Illuminate\Support\Facades\Log; trait PlayerAspg { @@ -59,11 +60,17 @@ trait PlayerAspg $this->calculationVariables = []; $collection_1 = $this->loadPartsPlayer(1, $players); + $collection_2 = $this->loadPartsPlayer(2, $players); + // dd($collection_1, $collection_2); + $filtered_part_1 = $this->filterPlayer($collection_1); + $filtered_part_2 = $this->filterPlayer($collection_2); + // Log::debug('calculationVariables', [$filtered_part_1, $filtered_part_2]); + $this->mergeData($filtered_part_1, $filtered_part_2); $this->dispatch('update-players', players: $this->players); diff --git a/app/Traits/PlayerProps/PlayerQuery.php b/app/Traits/PlayerProps/PlayerQuery.php index e884f883..3717f7f3 100644 --- a/app/Traits/PlayerProps/PlayerQuery.php +++ b/app/Traits/PlayerProps/PlayerQuery.php @@ -5,6 +5,7 @@ namespace App\Traits\PlayerProps; use App\Models\StatistikoDetail; use App\Models\StatistikoPlayer; use Illuminate\Support\Carbon; +use Illuminate\Support\Facades\Log; // use Illuminate\Support\Facades\Log; @@ -188,6 +189,8 @@ trait PlayerQuery $this->season_selected = array_map('intval', $this->season_selected); } + // Log::debug('season_selected',[$this->season_selected]); + return match ($part) { 1 => StatistikoPlayer::with('details') ->whereIn('ss_player_id', $player_ids)