modifications details
This commit is contained in:
1 parent
c143dcf727
commit
c1892e86aa
21 files changed
+99
-108
No files matched your search
@@ -20,7 +20,7 @@ class LoadPlayerPerformance
|
||||
|
||||
$team_id = (int) $filter['team_id'] ?? 0;
|
||||
|
||||
$tm_player_id = (int) $filter['tm_player_id'] ?? 0;
|
||||
$ss_player_id = (int) $filter['ss_player_id'] ?? 0;
|
||||
|
||||
$statistic_type = $filter['statistic_type'] ?? 'gls';
|
||||
|
||||
@@ -32,18 +32,18 @@ class LoadPlayerPerformance
|
||||
if (! $team_id) {
|
||||
return [];
|
||||
}
|
||||
if (! $tm_player_id) {
|
||||
if (! $ss_player_id) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$player_name = StatistikoDetail::where('tm_player_id', (int) $tm_player_id)->value('name');
|
||||
$player_name = StatistikoDetail::where('ss_player_id', (int) $ss_player_id)->value('name');
|
||||
|
||||
if ($statistic_type == 'none') {
|
||||
$statistic_type = 'gls';
|
||||
}
|
||||
|
||||
$matches_played = StatistikoPlayer::with('event')
|
||||
->where('tm_player_id', (int) $tm_player_id)
|
||||
->where('ss_player_id', (int) $ss_player_id)
|
||||
->when($player_on_field, function ($query) use ($player_on_field) {
|
||||
switch ($player_on_field) {
|
||||
case 'lineup':
|
||||
|
||||
Reference in new issue
Block a user