We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4c448f commit 5d292a2Copy full SHA for 5d292a2
src/Eloquent/Model.php
@@ -155,8 +155,12 @@ public function getAttribute($key)
155
}
156
157
// This checks for embedded relation support.
158
- if (method_exists($this, $key) && ! method_exists(self::class, $key)) {
159
- return $this->getRelationValue($key);
+ if (
+ method_exists($this, $key)
160
+ && ! method_exists(self::class, $key)
161
+ && ! $this->hasAttributeGetMutator($key)
162
+ ) {
163
+ return $this->getRelationValue($key);
164
165
166
return parent::getAttribute($key);
0 commit comments