wip performance

This commit is contained in:
salam committed 2026-09-25 11:08:33 +02:00
1 parent 7bf4258c4a
commit 5ffbc07564
11 files changed
+575 -32

No files matched your search

@@ -2,6 +2,7 @@
namespace App\Actions;
use App\Models\SofaScoreRosa;
use App\Models\StatisticFixtures;
class LoadStatisticFixturesMatchOptions
@@ -11,11 +12,13 @@ class LoadStatisticFixturesMatchOptions
if (! $league_id) {
return [];
}
$team_map = SofaScoreRosa::pluck('ss_team_name', 'ss_team_id')->toArray();
$res = StatisticFixtures::where('league_id', $league_id)->get();
$arr = [];
foreach ($res as $val) {
$arr[$val->id] = $val->starttime->format('Y-m-d H:i') . ' - ' . $val->home->ss_team_name . ' vs ' . $val->away->ss_team_name;
$arr[$val->id] = $val->starttime->format('Y-m-d H:i').' - '.$team_map[$val->home_id].' vs '.$team_map[$val->away_id];
}
return $arr;