X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FEpisode.php;h=1c16f7f4a9ac7f8fab1bf2719c666514fa2c45cc;hb=7dbb5572dc613186d45fd08275cac81249af06aa;hp=15af89cf76f715135d299f00ec902ec27cd9f5f2;hpb=e2af94795e9d8e8a2eb8c272201b4e54ebb130f0;p=alttp.git diff --git a/app/Models/Episode.php b/app/Models/Episode.php index 15af89c..1c16f7f 100644 --- a/app/Models/Episode.php +++ b/app/Models/Episode.php @@ -11,13 +11,19 @@ class Episode extends Model use HasFactory; public function channels() { - return $this->belongsToMany(Channel::class); + return $this->belongsToMany(Channel::class) + ->using(Restream::class) + ->withPivot('accept_comms', 'accept_tracker'); } public function crew() { return $this->hasMany(EpisodeCrew::class); } + public function confirmedCrew() { + return $this->crew()->where('confirmed', true); + } + public function event() { return $this->belongsTo(Event::class); }