wip
This commit is contained in:
1 parent
f40009a878
commit
fd4c44de9c
1 file changed
+5
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Actions\Statistics;
|
||||
|
||||
use App\Models\StatisticFixtures;
|
||||
use App\Models\StatistikoEvent;
|
||||
|
||||
class LoadEvents
|
||||
@@ -32,17 +33,17 @@ class LoadEvents
|
||||
/**
|
||||
* ACCURACY DATA
|
||||
*/
|
||||
switch ($team_position) {
|
||||
switch ($filter['team_position']) {
|
||||
case 'home':
|
||||
$res = StatistikoEvent::where('league_id', $league_id)->where('home_id', $team_id)->first();
|
||||
$res = StatisticFixtures::where('league_id', $league_id)->where('home_id', $team_id)->first();
|
||||
break;
|
||||
|
||||
case 'away':
|
||||
$res = StatistikoEvent::where('league_id', $league_id)->where('away_id', $team_id)->first();
|
||||
$res = StatisticFixtures::where('league_id', $league_id)->where('away_id', $team_id)->first();
|
||||
break;
|
||||
|
||||
default:
|
||||
$res = StatistikoEvent::where('league_id', $league_id)
|
||||
$res = StatisticFixtures::where('league_id', $league_id)
|
||||
->where(function ($query) use ($team_id) {
|
||||
$query->where('home_id', '=', $team_id)->orWhere('away_id', '=', $team_id);
|
||||
})->first();
|
||||
|
||||
Reference in new issue
Block a user