wip
This commit is contained in:
1 parent
68607108b4
commit
4ec3a86c9e
4 files changed
+7
-3
No files matched your search
@@ -93,7 +93,7 @@ class Grapper
|
||||
|
||||
if (! $force && SofaScoreEventGrapped::where('id', (int) $event['id'])->exists()) {
|
||||
if ($debug) {
|
||||
Notice::note('Grapped ' . $day . ' - ' . $event['homeTeam']['name'] . ' vs ' . $event['awayTeam']['name'], 'g');
|
||||
Notice::note('Allready grapped at ' . $day . ' - ' . $event['homeTeam']['name'] . ' vs ' . $event['awayTeam']['name'], 'g');
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
@@ -80,6 +80,10 @@ class LoadDays
|
||||
Notice::note('NO DATES OR ALL GRAPPED', 'br', 1);
|
||||
}
|
||||
|
||||
if ($debug) {
|
||||
Notice::note($dates, 'b');
|
||||
}
|
||||
|
||||
// remove when element in array is double (day and slug)
|
||||
$dates = array_unique($dates, SORT_REGULAR);
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ class LoadEvents
|
||||
$team_position = 'all';
|
||||
}
|
||||
|
||||
if (!isset($res['all'])) {
|
||||
if (!isset($res['all']) || !isset($res[$team_position])) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ class LoadEventsQuery
|
||||
->where(function ($query) use ($team_id, $home_id, $away_id, $similar_past_matches) {
|
||||
if ($similar_past_matches == 'none') {
|
||||
if ($team_id) {
|
||||
return $query->where('home_id', $team_id)
|
||||
return $query->orWhere('home_id', $team_id)
|
||||
->orWhere('away_id', '=', $team_id);
|
||||
} else {
|
||||
return $query->whereIn('home_id', [$home_id, $away_id])->orWhereIn('away_id', [$home_id, $away_id]);
|
||||
|
||||
Reference in new issue
Block a user