From 7105e4363e2a7d89df8bd026b752895d8559700e Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Thu, 29 Feb 2024 14:08:52 -0500 Subject: [PATCH] use the value returned by calling getAttribute() method on model --- src/Database/Model.php | 2 +- src/Halcyon/Model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Database/Model.php b/src/Database/Model.php index 40390596..702e5161 100644 --- a/src/Database/Model.php +++ b/src/Database/Model.php @@ -1392,7 +1392,7 @@ public function setAttribute($key, $value) * }); * */ - $this->fireEvent('model.setAttribute', [$key, $value]); + $this->fireEvent('model.setAttribute', [$key, $this->getAttribute($key)]); return $result; } diff --git a/src/Halcyon/Model.php b/src/Halcyon/Model.php index f51c3ac4..6ad6e1b0 100644 --- a/src/Halcyon/Model.php +++ b/src/Halcyon/Model.php @@ -795,7 +795,7 @@ public function setAttribute($key, $value) * @see Winter\Storm\Database\Model::setAttributeValue */ // After Event - $this->fireEvent('model.setAttribute', [$key, $value]); + $this->fireEvent('model.setAttribute', [$key, $this->getAttribute($key)]); return $this; }