]> git.localhorst.tv Git - alttp.git/blobdiff - app/Models/Protocol.php
option to hide round numbers
[alttp.git] / app / Models / Protocol.php
index b747b1258d147472ad0a158d97f80e319f915943..60b25f2ad8cd6cd21c4003fc747e40c808e1b132 100644 (file)
@@ -217,6 +217,18 @@ class Protocol extends Model
                ProtocolAdded::dispatch($protocol);
        }
 
+       public static function tournamentSettings(Tournament $tournament, User $user = null) {
+               $protocol = static::create([
+                       'tournament_id' => $tournament->id,
+                       'user_id' => $user ? $user->id : null,
+                       'type' => 'tournament.settings',
+                       'details' => [
+                               'tournament' => static::tournamentMemo($tournament),
+                       ],
+               ]);
+               ProtocolAdded::dispatch($protocol);
+       }
+
        public static function tournamentUnlocked(Tournament $tournament, User $user = null) {
                $protocol = static::create([
                        'tournament_id' => $tournament->id,