]> git.localhorst.tv Git - alttp.git/blob - app/Console/Commands/RecalculateRoundPlacements.php
server calculated scoring
[alttp.git] / app / Console / Commands / RecalculateRoundPlacements.php
1 <?php
2
3 namespace App\Console\Commands;
4
5 use App\Models\Round;
6 use Illuminate\Console\Command;
7
8 class RecalculateRoundPlacements extends Command
9 {
10         /**
11          * The name and signature of the console command.
12          *
13          * @var string
14          */
15         protected $signature = 'round:recalc {round}';
16
17         /**
18          * The console command description.
19          *
20          * @var string
21          */
22         protected $description = 'Recalculate round placements';
23
24         /**
25          * Execute the console command.
26          *
27          * @return int
28          */
29         public function handle()
30         {
31                 $round = Round::findOrFail($this->argument('round'));
32
33                 $round->updatePlacement();
34
35                 return 0;
36         }
37 }