StatistikoEvent in LoadEvents for statistiks
This commit is contained in:
1 parent
ac8d21178b
commit
f40009a878
3 files changed
+12
-7
No files matched your search
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Actions\Statistics;
|
namespace App\Actions\Statistics;
|
||||||
|
|
||||||
use App\Models\StatisticFixtures;
|
|
||||||
use App\Models\StatistikoEvent;
|
use App\Models\StatistikoEvent;
|
||||||
|
|
||||||
class LoadEvents
|
class LoadEvents
|
||||||
@@ -33,17 +32,17 @@ class LoadEvents
|
|||||||
/**
|
/**
|
||||||
* ACCURACY DATA
|
* ACCURACY DATA
|
||||||
*/
|
*/
|
||||||
switch ($filter['team_position']) {
|
switch ($team_position) {
|
||||||
case 'home':
|
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;
|
break;
|
||||||
|
|
||||||
case 'away':
|
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$res = StatisticFixtures::where('league_id', $league_id)
|
$res = StatistikoEvent::where('league_id', $league_id)
|
||||||
->where(function ($query) use ($team_id) {
|
->where(function ($query) use ($team_id) {
|
||||||
$query->where('home_id', '=', $team_id)->orWhere('away_id', '=', $team_id);
|
$query->where('home_id', '=', $team_id)->orWhere('away_id', '=', $team_id);
|
||||||
})->first();
|
})->first();
|
||||||
|
|||||||
@@ -22,7 +22,13 @@ class ImportEvents
|
|||||||
|
|
||||||
$row = array_values($row);
|
$row = array_values($row);
|
||||||
|
|
||||||
dd($row);
|
/*
|
||||||
|
0 => 14082828
|
||||||
|
1 => 1
|
||||||
|
2 => 12
|
||||||
|
3 => 1661
|
||||||
|
4 => 4781
|
||||||
|
*/
|
||||||
|
|
||||||
StatistikoEvent::where('match_id', $row[0])
|
StatistikoEvent::where('match_id', $row[0])
|
||||||
->where('sport_id', $row[1])
|
->where('sport_id', $row[1])
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class Statistic extends BaseDashboard
|
|||||||
->columnSpanFull(),
|
->columnSpanFull(),
|
||||||
Section::make()
|
Section::make()
|
||||||
->schema([
|
->schema([
|
||||||
Select::make('palyer_id')
|
Select::make('tm_player_id')
|
||||||
->label('Player')
|
->label('Player')
|
||||||
->prefixIcon('icon-player')
|
->prefixIcon('icon-player')
|
||||||
->options([
|
->options([
|
||||||
|
|||||||
Reference in new issue
Block a user