X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=app%2FModels%2FEpisode.php;h=15af89cf76f715135d299f00ec902ec27cd9f5f2;hb=e7eb3495728ca9c2883d7cf07b363b48a95231fe;hp=b4a4ec824ea3f3ccf13fc2b74d7e6e12755fece4;hpb=071885a30f24b980699b337d9cdb65952f8c6c42;p=alttp.git diff --git a/app/Models/Episode.php b/app/Models/Episode.php index b4a4ec8..15af89c 100644 --- a/app/Models/Episode.php +++ b/app/Models/Episode.php @@ -10,6 +10,14 @@ class Episode extends Model use HasFactory; + public function channels() { + return $this->belongsToMany(Channel::class); + } + + public function crew() { + return $this->hasMany(EpisodeCrew::class); + } + public function event() { return $this->belongsTo(Event::class); } @@ -20,6 +28,13 @@ class Episode extends Model protected $casts = [ 'confirmed' => 'boolean', + 'start' => 'datetime', + ]; + + protected $hidden = [ + 'created_at', + 'ext_id', + 'updated_at', ]; }