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