build editor

This commit is contained in:
2023-10-23 18:05:06 +03:00
parent e2e3842cd0
commit 9346969d2b
19 changed files with 534 additions and 206 deletions
+13 -1
View File
@@ -22,9 +22,21 @@ class Record implements JsonSerializable
}
private function indexValues(array $arrObject){
return trim(Str::lower(collect($arrObject)
->map(function($value){
if(!is_string($value)){
return $this->indexValues($value ?? []);
}
return $value;
})
->values()->join(" ")." ". $this->_file?->originalName ?? ""));
}
public function toDB(): array
{
$searchIndex = trim(Str::lower(collect($this->data)->values()->join(" ")." ". $this->_file?->originalName ?? ""));
$searchIndex = $this->indexValues($this->data->toArray());
return [
"id" => $this->id,
"status" => $this->status->value,