wip
This commit is contained in:
1 parent
2545542033
commit
ac7037170d
1 file changed
+6
-2
+6
-2
@@ -28,12 +28,16 @@ class SofaScoreTournamentsTable
|
||||
->label('Update Roosters')
|
||||
->action(function () {
|
||||
$res = SofaScoreTournament::whereNotNull('ss_liga_code')->where('ss_liga_code', '<>', '')->where('enabled', 1)->pluck('ss_liga_code', 'tournament_id');
|
||||
|
||||
foreach ($res as $tournament_id => $ss_liga_code) {
|
||||
$rosa = SofaScoreRosa::where('cc', $ss_liga_code)->get();
|
||||
SofaScoreRosaTournament::where('ss_tournament_id', $tournament_id)->update(['grapped' => 0, 'disabled' => 1]);
|
||||
|
||||
$rosa = SofaScoreRosa::where('cc', $ss_liga_code)->where('is_active', 1)->get();
|
||||
|
||||
foreach ($rosa as $team) {
|
||||
SofaScoreRosaTournament::updateOrCreate(
|
||||
['ss_team_id' => $team->ss_team_id, 'ss_tournament_id' => $tournament_id],
|
||||
['grapped' => 0, 'disabled' => 0]
|
||||
['disabled' => 0]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user