*/ protected $fillable = [ 'vault_id', 'fileable_id', 'fileable_type', 'uuid', 'original_url', 'cdn_url', 'name', 'mime_type', 'type', 'size', ]; /** * The event map for the model. * * @var array */ protected $dispatchesEvents = [ 'deleted' => FileDeleted::class, ]; /** * Get the vault associated with the file. */ public function vault(): BelongsTo { return $this->belongsTo(Vault::class); } /** * Get the parent model that matches this file. */ public function fileable(): MorphTo { return $this->morphTo(); } }