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;
|
||||
|
||||
@@ -22,7 +22,7 @@ class LoadPlayer
|
||||
|
||||
$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;
|
||||
|
||||
$start = $filter['start_date'] ?? 0;
|
||||
|
||||
@@ -38,7 +38,7 @@ class LoadPlayer
|
||||
if (! $team_id) {
|
||||
return [];
|
||||
}
|
||||
if (! $tm_player_id) {
|
||||
if (! $ss_player_id) {
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -46,9 +46,9 @@ class LoadPlayer
|
||||
$statistic_type = 'gls';
|
||||
}
|
||||
|
||||
$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');
|
||||
|
||||
$res = StatistikoPlayer::with('event')->where('tm_player_id', (int) $tm_player_id)->get();
|
||||
$res = StatistikoPlayer::with('event')->where('ss_player_id', (int) $ss_player_id)->get();
|
||||
|
||||
$labels = [];
|
||||
$datasets = [];
|
||||
|
||||
@@ -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