Skip to content

Commit daca387

Browse files
author
Pantea Marius-ciclistu
committed
1 parent 33d93d4 commit daca387

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

illuminate/Database/Eloquent/Model.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ public function save(array $options = [])
11631163
- updating event can do changes so, $this->getDirtyForUpdate() and $this->syncChanges() will call
11641164
$this->getDirty(),
11651165
- updated/saved events can do changes so, $this->syncOriginal() will call $this->getAttributes() */
1166-
if (!$this->getEventDispatcher()->hasListeners($this::class . '.updating')) {
1166+
if (!$this->getEventDispatcher()->hasListeners('eloquent.updating: ' . $this::class)) {
11671167
$this->tmpDirtyIfAttributesAreSyncedFromCashedCasts = $dirty;
11681168
unset($dirty);
11691169
}
@@ -1227,7 +1227,7 @@ protected function finishSave(array $options)
12271227
{
12281228
if (
12291229
isset($this->tmpDirtyIfAttributesAreSyncedFromCashedCasts)
1230-
&& $this->getEventDispatcher()->hasListeners($this::class . '.saved')
1230+
&& $this->getEventDispatcher()->hasListeners('eloquent.saved: ' . $this::class)
12311231
) {
12321232
$this->tmpDirtyIfAttributesAreSyncedFromCashedCasts = null;
12331233
}
@@ -1276,7 +1276,7 @@ protected function performUpdate(Builder $query)
12761276

12771277
if (
12781278
isset($this->tmpDirtyIfAttributesAreSyncedFromCashedCasts)
1279-
&& $this->getEventDispatcher()->hasListeners($this::class . '.updated')
1279+
&& $this->getEventDispatcher()->hasListeners('eloquent.updated: ' . $this::class)
12801280
) {
12811281
$this->tmpDirtyIfAttributesAreSyncedFromCashedCasts = null;
12821282
}

0 commit comments

Comments
 (0)