Skip to content

Commit

Permalink
Support for using append attributes as key names
Browse files Browse the repository at this point in the history
  • Loading branch information
terranc committed Aug 1, 2019
1 parent 483a4d6 commit 199a953
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/Eloquent/Concerns/HasAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ protected function getArrayableAppends()
if (is_string($k)) {
$columns = explode('|', $k);
foreach ($columns as $column) {
if (!isset($this->attributes[$column])) {
if (!isset($this->$column)) {
unset($this->appends[$k]);
}
}
Expand Down

0 comments on commit 199a953

Please # to comment.