*/ protected $fillable = [ 'media_id', ]; /** * Get attachments attachable */ public function attachable() { return $this->morphTo(); } /** * Get the media for this attachment. */ public function media() { return $this->belongsTo(Media::class); } }