Files
lotteryLaravel/database/seeders/OddsPrizeScopesBackfillSeeder.php

21 lines
485 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace Database\Seeders;
use App\Models\OddsVersion;
use App\Support\OddsStandardScopes;
use Illuminate\Database\Seeder;
/**
* 为历史 odds_versions 补全 §5.5 五档 prize_scope幂等可重复执行
*/
class OddsPrizeScopesBackfillSeeder extends Seeder
{
public function run(): void
{
foreach (OddsVersion::query()->orderBy('id')->cursor() as $version) {
OddsStandardScopes::syncMissingForVersion($version);
}
}
}