modifications details
This commit is contained in:
1 parent
c143dcf727
commit
c1892e86aa
21 files changed
+99
-108
No files matched your search
@@ -24,7 +24,7 @@ class LoadEvents
|
||||
|
||||
$season = $filter['season'] ?? 0;
|
||||
|
||||
$tm_player_id = (int) $filter['tm_player_id'] ?? 0;
|
||||
$ss_player_id = (int) $filter['ss_player_id'] ?? 0;
|
||||
|
||||
$start = $filter['start_date'] ?? 0;
|
||||
|
||||
@@ -97,7 +97,7 @@ class LoadEvents
|
||||
$matches_played = [];
|
||||
$description = '';
|
||||
|
||||
if ($tm_player_id) {
|
||||
if ($ss_player_id) {
|
||||
|
||||
$matches_season = StatistikoEvent::where(function ($query) use ($team_id, $team_position) {
|
||||
switch ($team_position) {
|
||||
@@ -113,7 +113,7 @@ class LoadEvents
|
||||
|
||||
$matches_played = StatistikoPlayer::query()
|
||||
->whereIn('match_id', $matches_season)
|
||||
->where('tm_player_id', $tm_player_id)
|
||||
->where('ss_player_id', $ss_player_id)
|
||||
->when($player_on_field, function ($query) use ($player_on_field) {
|
||||
// 'all' => 'All',
|
||||
// 'lineup' => 'Lineup',
|
||||
@@ -132,7 +132,7 @@ class LoadEvents
|
||||
})
|
||||
->pluck('match_id')->toArray();
|
||||
|
||||
$description = ' with ' . StatistikoDetail::where('tm_player_id', (int) $tm_player_id)->value('name') . ' (' . \count($matches_played) . ')';
|
||||
$description = ' with ' . StatistikoDetail::where('ss_player_id', (int) $ss_player_id)->value('name') . ' (' . \count($matches_played) . ')';
|
||||
|
||||
if (! $matches_played) {
|
||||
$matches_played[] = -1;
|
||||
|
||||
Reference in new issue
Block a user