fix update player

This commit is contained in:
salam committed 2026-09-11 10:36:16 +02:00
1 parent e3f1e8a8d9
commit f028a8b2a8
16 files changed
+605 -224

No files matched your search

+1 -7
View File
@@ -6,24 +6,18 @@ use App\Models\SofaScorePlayerCache;
use App\Models\SofaScorePlayerPerSeason;
use App\Models\StatistikoDetail;
use App\Models\StatistikoPlayer;
use App\Utilities\Notice;
class PlayerPerSeason
{
public static function run()
{
$debug = 0;
// when data changes clear player cache
SofaScorePlayerCache::truncate();
$res = StatistikoDetail::query()->where('is_active', 1)->select('ss_player_id', 'ss_team_id')->get();
foreach ($res as $key => $val) {
if ($debug) {
Notice::note($val->ss_player_id.' - '.$res->count().'/'.$key + 1, 'g');
}
foreach ($res as $val) {
$collection = [];