This commit is contained in:
salam committed 2026-10-11 19:12:25 +02:00
1 parent f9c0c5aec5
commit e0c1baf849
6 files changed
+32 -22

No files matched your search

@@ -4,6 +4,7 @@ namespace App\Filament\Pages\Selections;
use App\Filament\Pages\Selections\Helper\GetSeason;
use App\Models\SofaScorePlayerPerSeason;
use App\Models\StatistikoDetail;
use App\Models\StatistikoEvent;
class LoadPlayerSelection
@@ -35,12 +36,12 @@ class LoadPlayerSelection
$positions_map = LoadPositions::load();
$player = SofaScorePlayerPerSeason::with('details')->where('ss_team_id', $team_id)->whereIn('season', $season)->get();
$team_player_ids = StatistikoDetail::where('ss_team_id', $team_id)->pluck('ss_player_id')->toArray();
// dd($player);
$players = SofaScorePlayerPerSeason::with('details')->where('season', $season)->whereIn('ss_player_id', $team_player_ids)->get();
$arr = [];
foreach ($player as $val) {
foreach ($players as $val) {
if ($val->details) {
$player_id = $val->ss_player_id;
if (! isset($arr[$player_id])) {