fix: enforce unique national ID validation and fix sync updated_at corruption

This commit is contained in:
SajjadMahmoody
2026-04-28 23:31:19 +03:30
parent dc524f1fb6
commit 721ee30948
9 changed files with 77 additions and 186 deletions
+4 -2
View File
@@ -38,8 +38,10 @@ public function updated(Model $model): void
}
$changedData = [];
foreach ($dirty as $field => $newValue) {
$changedData[$field] = $model->getAttribute($field);
foreach ($dirty as $field => $rawValue) {
$changedData[$field] = $rawValue instanceof \BackedEnum
? $rawValue->value
: (is_object($rawValue) ? (string) $rawValue : $rawValue);
}
SyncLog::create([