X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FHttp%2FControllers%2FRoundController.php;fp=app%2FHttp%2FControllers%2FRoundController.php;h=1488d97bff92e15004407c2bc6493f507761bfcd;hb=4388278823ac8a791641ac1d65fc675e9543b8e8;hp=10e4d14857fd45000863df2fab536583a8404c6e;hpb=2efd7613561696a3abb19ee9f42b15cf9b4058ad;p=alttp.git diff --git a/app/Http/Controllers/RoundController.php b/app/Http/Controllers/RoundController.php index 10e4d14..1488d97 100644 --- a/app/Http/Controllers/RoundController.php +++ b/app/Http/Controllers/RoundController.php @@ -2,6 +2,8 @@ namespace App\Http\Controllers; +use App\Events\RoundAdded; +use App\Models\Protocol; use App\Models\Round; use App\Models\Tournament; use Illuminate\Http\Request; @@ -20,6 +22,14 @@ class RoundController extends Controller 'tournament_id' => $validatedData['tournament_id'], ]); + Protocol::roundAdded( + $tournament, + $round, + $request->user(), + ); + + RoundAdded::dispatch($round); + return $round->toJson(); }