use HasFactory;
+ public function channels() {
+ 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 confirmedCrewOfChannel(Channel $channel) {
+ return $this->confirmedCrew()->where('channel_id', '=', $channel->id);
+ }
+
public function event() {
return $this->belongsTo(Event::class);
}
protected $casts = [
'confirmed' => 'boolean',
+ 'start' => 'datetime',
+ ];
+
+ protected $hidden = [
+ 'created_at',
+ 'updated_at',
];
}