X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FEvent.php;h=331a384f8d1147deb04292552bdfec15a156eef4;hb=212561cf1c6724b52c490104f5a2b4c3418b1c62;hp=44bc69be067f3722f0bb6e9b8b37a94147becb3d;hpb=071885a30f24b980699b337d9cdb65952f8c6c42;p=alttp.git diff --git a/app/Models/Event.php b/app/Models/Event.php index 44bc69b..331a384 100644 --- a/app/Models/Event.php +++ b/app/Models/Event.php @@ -10,12 +10,23 @@ class Event extends Model use HasFactory; + public function description() { + return $this->belongsTo(Technique::class); + } + public function episodes() { return $this->hasMany(Episode::class); } protected $casts = [ + 'end' => 'datetime', + 'start' => 'datetime', 'visible' => 'boolean', ]; + protected $hidden = [ + 'created_at', + 'updated_at', + ]; + }