'array', 'mimetypes' => 'array', ]; public function files() { return $this->hasMany(File::class); } protected function exts(): Attribute { return Attribute::make( set: fn ($value) => json_encode($value), ); } protected function mimetypes(): Attribute { return Attribute::make( set: fn ($value) => json_encode($value), ); } public function getExts() { return implode(",", app()->collection->exts); } public function getMimeTypes() { return implode(",", app()->collection->mimetypes); } }