'integer', 'podcast_id' => 'integer', 'data' => 'array', ]; protected static function booted() { static::creating(function ($model) { if (! $model->created_by) { $model->created_by = auth()->id(); } }); } public function createdBy(): BelongsTo { return $this->belongsTo(User::class, 'created_by'); } public function podcast(): BelongsTo { return $this->belongsTo(Podcast::class); } public function libraryItem(): HasOne { return $this->hasOne(LibraryItem::class); } }