*/ protected $fillable = [ 'media_id', 'private', ]; /** * The default attributes. * * @var string[] */ protected $attributes = [ 'private' => false, ]; /** * Get attachments attachable * * @return MorphTo */ public function attachable(): MorphTo { return $this->morphTo(); } /** * Get the media for this attachment. * * @return BelongsTo */ public function media(): BelongsTo { return $this->belongsTo(Media::class); } }