fix: nullable db error

This commit is contained in:
b1ek 2024-08-30 08:10:05 +10:00
parent 0ca5a445f5
commit 7cee091b6d
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ class HistoryObserver
History::create([
'model_id' => $model->id,
'model_name' => $model->getTable(),
'before' => null,
'before' => [],
'after' => $model->toArray(),
'action' => HistoryAction::Insert,
]);
@ -33,7 +33,7 @@ class HistoryObserver
'model_id' => $model->id,
'model_name' => $model->getTable(),
'before' => $model->getRawOriginal(),
'after' => null,
'after' => [],
'action' => HistoryAction::Delete,
]);
}