Skip to content

Commit 9e783b6

Browse files
committed
Detect changes on saving event to catch creating too
1 parent 2767b47 commit 9e783b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Concerns/DetectsChanges.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ trait DetectsChanges
1616
*/
1717
protected static function bootDetectsChanges()
1818
{
19-
static::updating(function (Model $model) {
19+
static::saving(function (Model $model) {
2020
$oldModel = $model->replicate()->setRawAttributes($model->getOriginal());
2121

2222
$model->oldAttributes = $oldModel->getLoggedAttributeValues();

0 commit comments

Comments
 (0)