We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06ba2a9 commit 3752aa8Copy full SHA for 3752aa8
src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
@@ -353,7 +353,8 @@ public function getAttribute($key)
353
// If the attribute exists in the attribute array or has a "get" mutator we will
354
// get the attribute's value. Otherwise, we will proceed as if the developers
355
// are asking for a relationship's value. This covers both types of values.
356
- if (array_key_exists($key, $this->getAttributes()) ||
+ if (array_key_exists($key, $this->attributes) ||
357
+ array_key_exists($key, $this->casts) ||
358
$this->hasGetMutator($key) ||
359
$this->isClassCastable($key)) {
360
return $this->getAttributeValue($key);
0 commit comments