StatistikoEvent in LoadEvents for statistiks

This commit is contained in:
salam committed 2026-05-21 15:44:02 +02:00
1 parent ac8d21178b
commit f40009a878
3 files changed
+12 -7

No files matched your search

+4 -5
View File
@@ -2,7 +2,6 @@
namespace App\Actions\Statistics;
use App\Models\StatisticFixtures;
use App\Models\StatistikoEvent;
class LoadEvents
@@ -33,17 +32,17 @@ class LoadEvents
/**
* ACCURACY DATA
*/
switch ($filter['team_position']) {
switch ($team_position) {
case 'home':
$res = StatisticFixtures::where('league_id', $league_id)->where('home_id', $team_id)->first();
$res = StatistikoEvent::where('league_id', $league_id)->where('home_id', $team_id)->first();
break;
case 'away':
$res = StatisticFixtures::where('league_id', $league_id)->where('away_id', $team_id)->first();
$res = StatistikoEvent::where('league_id', $league_id)->where('away_id', $team_id)->first();
break;
default:
$res = StatisticFixtures::where('league_id', $league_id)
$res = StatistikoEvent::where('league_id', $league_id)
->where(function ($query) use ($team_id) {
$query->where('home_id', '=', $team_id)->orWhere('away_id', '=', $team_id);
})->first();
+7 -1
View File
@@ -22,7 +22,13 @@ class ImportEvents
$row = array_values($row);
dd($row);
/*
0 => 14082828
1 => 1
2 => 12
3 => 1661
4 => 4781
*/
StatistikoEvent::where('match_id', $row[0])
->where('sport_id', $row[1])
+1 -1
View File
@@ -85,7 +85,7 @@ class Statistic extends BaseDashboard
->columnSpanFull(),
Section::make()
->schema([
Select::make('palyer_id')
Select::make('tm_player_id')
->label('Player')
->prefixIcon('icon-player')
->options([