*/ protected $fillable = [ 'vault_id', 'fileable_id', 'fileable_type', 'ufileable_id', '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. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\Vault, $this> */ public function vault(): BelongsTo { return $this->belongsTo(Vault::class); } /** * Get the parent model that matches this file. */ public function fileable(): MorphTo { return $this->morphTo(); } /** * Get the parent model that matches this file. */ public function ufileable(): MorphTo { return $this->morphTo(type: 'fileable_type'); } }