Browse Source

Additional fields to LobbyModel.

Kain_Stropov 5 years ago
parent
commit
da5bb0e4a4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/HttpModels/LobbyModel.php

+ 2 - 0
app/HttpModels/LobbyModel.php

@@ -6,6 +6,7 @@ use App\Models\Lobby;
 class LobbyModel extends ClientLobbyModel {
 class LobbyModel extends ClientLobbyModel {
     public $isStrangerAccessible;
     public $isStrangerAccessible;
     public $isClientAccessible;
     public $isClientAccessible;
+    public $isActive;
     public $meetings = [];
     public $meetings = [];
 
 
     public function __construct(Lobby $lobby)
     public function __construct(Lobby $lobby)
@@ -13,6 +14,7 @@ class LobbyModel extends ClientLobbyModel {
         parent::__construct($lobby);
         parent::__construct($lobby);
         $this->isStrangerAccessible = $lobby->is_stranger_accessible;
         $this->isStrangerAccessible = $lobby->is_stranger_accessible;
         $this->isClientAccessible = $lobby->is_client_accessible;
         $this->isClientAccessible = $lobby->is_client_accessible;
+        $this->isActive = $lobby->is_active;
         foreach ($lobby->meetings()->where('meeting.is_active',true)->get() as $meeting) {
         foreach ($lobby->meetings()->where('meeting.is_active',true)->get() as $meeting) {
             $this->meetings[] = new MeetingModel($meeting);
             $this->meetings[] = new MeetingModel($meeting);
         }
         }