]> git.localhorst.tv Git - alttp.git/blobdiff - app/Models/Protocol.php
round titles
[alttp.git] / app / Models / Protocol.php
index 9aaa5b08d1a8f5b519350ffa0ee2f85fd24543c1..ce081e77dded2c6bf7f92af76381d1a0364e54e6 100644 (file)
@@ -93,6 +93,19 @@ class Protocol extends Model
                ProtocolAdded::dispatch($protocol);
        }
 
+       public static function roundEdited(Tournament $tournament, Round $round, User $user) {
+               $protocol = static::create([
+                       'tournament_id' => $tournament->id,
+                       'user_id' => $user->id,
+                       'type' => 'round.edit',
+                       'details' => [
+                               'tournament' => static::tournamentMemo($tournament),
+                               'round' => static::roundMemo($round),
+                       ],
+               ]);
+               ProtocolAdded::dispatch($protocol);
+       }
+
        public static function roundLocked(Tournament $tournament, Round $round, User $user = null) {
                $protocol = static::create([
                        'tournament_id' => $tournament->id,