When displaying a models attributes, items added with $append are not displayed.
This is because $get->attributes() (here) doesn't return them.
The only sane way I can think to do this is to iterate over the appends array and add them to the $appends array before iterating for the results.
Here's a patch that will show the appended elements, as well as fixes what looks to be a minor bug in that it only showed visible attributes before — highlighting visible/hidden/appended differently:
This output for a standard User model (faker data, with UUID keys), which hides password and remember_token attributes, and also has an is_deleted attribute appended:
(Apologies for not submitting a PR, I couldn't figure out which branch to best use)
When displaying a models attributes, items added with
$append
are not displayed.This is because
$get->attributes()
(here) doesn't return them.The only sane way I can think to do this is to iterate over the appends array and add them to the
$appends
array before iterating for the results.Here's a patch that will show the appended elements, as well as fixes what looks to be a minor bug in that it only showed visible attributes before — highlighting visible/hidden/appended differently:
This output for a standard User model (faker data, with UUID keys), which hides
password
andremember_token
attributes, and also has anis_deleted
attribute appended:(Apologies for not submitting a PR, I couldn't figure out which branch to best use)