]> git.localhorst.tv Git - alttp.git/blobdiff - app/Events/ApplicationRemoved.php
application admin UI
[alttp.git] / app / Events / ApplicationRemoved.php
diff --git a/app/Events/ApplicationRemoved.php b/app/Events/ApplicationRemoved.php
new file mode 100644 (file)
index 0000000..26ba162
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+
+namespace App\Events;
+
+use Illuminate\Broadcasting\Channel;
+use Illuminate\Broadcasting\InteractsWithSockets;
+use Illuminate\Broadcasting\PresenceChannel;
+use Illuminate\Broadcasting\PrivateChannel;
+use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
+use Illuminate\Foundation\Events\Dispatchable;
+use Illuminate\Queue\SerializesModels;
+
+class ApplicationRemoved implements ShouldBroadcast
+{
+       use Dispatchable, InteractsWithSockets, SerializesModels;
+
+       /**
+        * Create a new event instance.
+        *
+        * @return void
+        */
+       public function __construct($application_id, $tournament_id)
+       {
+               $this->application_id = $application_id;
+               $this->tournament_id = $tournament_id;
+       }
+
+       /**
+        * Get the channels the event should broadcast on.
+        *
+        * @return \Illuminate\Broadcasting\Channel|array
+        */
+       public function broadcastOn()
+       {
+               return new Channel('Tournament.'.$this->tournament_id);
+       }
+
+       public $application_id;
+       public $tournament_id;
+
+}