]> git.localhorst.tv Git - alttp.git/blobdiff - app/Models/Episode.php
track twitch category where chats were sent in
[alttp.git] / app / Models / Episode.php
index 2084a32b53f67c53ba0df0720c0f3d0c597973c8..4b8a96a53e2061f527db4d88d089ac411f90e1d9 100644 (file)
@@ -20,6 +20,14 @@ class Episode extends Model
                return $this->hasMany(EpisodeCrew::class);
        }
 
+       public function confirmedCrew() {
+               return $this->crew()->where('confirmed', true);
+       }
+
+       public function confirmedCrewOfChannel(Channel $channel) {
+               return $this->confirmedCrew()->where('channel_id', '=', $channel->id);
+       }
+
        public function event() {
                return $this->belongsTo(Event::class);
        }
@@ -35,7 +43,6 @@ class Episode extends Model
 
        protected $hidden = [
                'created_at',
-               'ext_id',
                'updated_at',
        ];