This commit is contained in:
salam committed 2026-09-23 11:50:01 +02:00
1 parent dc2e6b0fd3
commit 4cdec4be8e
3 files changed
+34 -24

No files matched your search

@@ -5,6 +5,7 @@ namespace App\Filament\Widgets\Data\LoadEvents;
use App\Filament\Pages\Selections\Helper\GetSeason;
use App\Models\StatistikoEvent;
use App\Models\StatistikoPlayer;
use Illuminate\Support\Facades\Log;
class LoadEventsQuery
{
@@ -33,9 +34,11 @@ class LoadEventsQuery
$statistic_type = 'gls';
}
// if($similar_past_matches != 'none'){
// $team_id = 0;
// }
if ($similar_past_matches != 'none') {
$team_position = '';
$team_id = 0;
$ss_player_id = 0;
}
// dd($season);
$season = GetSeason::load($season, $seasonmode);
@@ -134,6 +137,7 @@ class LoadEventsQuery
// dd($res);
// dd($season, $league_id, $res);
Log::info('season', $season);
$arr = [];
foreach ($res as $value) {
@@ -8,8 +8,6 @@ class LoadExpectations
{
public static function load(array $data, object $match, string $statistic_type)
{
$home_id = $match->home_id;
$away_id = $match->away_id;
// dd($data, $match);
@@ -64,6 +62,8 @@ class LoadExpectations
$away_got_total = [];
$away_got_away = [];
$home_id = $match->home_id;
$away_id = $match->away_id;
foreach ($data as $value) {
// HOME
// if ($value['home_id'] == $home_id || $value['away_id'] == $home_id) {
@@ -121,7 +121,6 @@ class LoadExpectations
$away_got_total[] = $value['val_home'];
$away_got_away[] = $value['val_away'];
}
}
$summe_home = array_sum($home_made_total) * $uba_home_made_total;
@@ -135,6 +134,7 @@ class LoadExpectations
$count_home = ! $count_home ? 1 : $count_home;
$aspettativa_home = round($summe_home / $count_home, 1);
// dd($count_home, $summe_home, $aspettativa_home);
$summe_away = array_sum($away_made_total) * $uba_away_made_total;
$summe_away += array_sum($away_made_away) * $uba_away_made_home;