fix: nullable db error
This commit is contained in:
parent
0ca5a445f5
commit
7cee091b6d
|
@ -10,7 +10,7 @@ class HistoryObserver
|
||||||
History::create([
|
History::create([
|
||||||
'model_id' => $model->id,
|
'model_id' => $model->id,
|
||||||
'model_name' => $model->getTable(),
|
'model_name' => $model->getTable(),
|
||||||
'before' => null,
|
'before' => [],
|
||||||
'after' => $model->toArray(),
|
'after' => $model->toArray(),
|
||||||
'action' => HistoryAction::Insert,
|
'action' => HistoryAction::Insert,
|
||||||
]);
|
]);
|
||||||
|
@ -33,7 +33,7 @@ class HistoryObserver
|
||||||
'model_id' => $model->id,
|
'model_id' => $model->id,
|
||||||
'model_name' => $model->getTable(),
|
'model_name' => $model->getTable(),
|
||||||
'before' => $model->getRawOriginal(),
|
'before' => $model->getRawOriginal(),
|
||||||
'after' => null,
|
'after' => [],
|
||||||
'action' => HistoryAction::Delete,
|
'action' => HistoryAction::Delete,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue