key = (string) Str::uuid(); }); } protected function casts(): array { return [ 'attachable_id' => 'integer', 'type' => AttachmentType::class, 'size' => 'integer', ]; } /** * @return MorphTo */ public function attachable(): MorphTo { return $this->morphTo(); } }