refactor files

This commit is contained in:
2024-09-19 23:36:43 +03:00
parent d0cd8228cc
commit 32c8378020
6 changed files with 13 additions and 19 deletions
+1
View File
@@ -17,6 +17,7 @@ class FilesSchema implements Schema
public string $name,
public string $label,
public Collection $fields,
public string $disk,
public string $path,
public array $groups,
public bool $isEntry = false,
+1
View File
@@ -36,6 +36,7 @@ class SchemaService
name: $schemaArr["name"],
label: $schemaArr["label"],
fields: (new Collection($schemaArr["fields"]))->map([$this, 'mapFields']),
disk: $schemaArr["disk"],
path: $schemaArr["path"] ?? $schemaArr["name"],
groups: $schemaArr["groups"] ?? [],
isEntry: $schemaArr["isEntry"] ?? false,