wip
This commit is contained in:
1 parent
e8dad96865
commit
1736ade495
1 file changed
+9
-4
@@ -202,16 +202,21 @@ trait PlayerQuery
|
||||
};
|
||||
|
||||
default:
|
||||
$date = false;
|
||||
if ($this->date_spliter != null) {
|
||||
$date = Carbon::parse($this->date_spliter)->endOfDay();
|
||||
}
|
||||
|
||||
return match ($part) {
|
||||
1 => StatistikoPlayer::with('details')
|
||||
->whereIn('ss_player_id', $player_ids)
|
||||
->when($this->date_spliter, function ($query) {
|
||||
return $query->whereDate('starttime', '>', $this->date_spliter);
|
||||
->when($date, function ($query) use ($date) {
|
||||
return $query->whereDate('starttime', '>', $date);
|
||||
})->get(),
|
||||
2 => StatistikoPlayer::with('details')
|
||||
->whereIn('ss_player_id', $player_ids)
|
||||
->when($this->season_selected, function ($query) {
|
||||
return $query->whereDate('starttime', '<=', $this->date_spliter);
|
||||
->when($date, function ($query) use ($date) {
|
||||
return $query->whereDate('starttime', '<=', $date);
|
||||
})->get(),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user