laravel/framework — pull request #4991 by andrewtweber (2014-07-09 06:24:46+00:00)
Title: Bug fix: Eloquent $hidden and $visible should trump $appends

If an attribute is appended to a Model, it should obey the `$hidden` and `$visible` arrays when converting the object to Array or JSON. Since `getArrayableAttributes()` does not included the appended attributes, it is necessary to instead check if the appended attribute key exists inside `$this->visible`