Skip to content

Commit

Permalink
document makeVisible
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 19, 2015
1 parent 8d6be87 commit b1d2932
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eloquent-serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ Alternatively, you may use the `visible` property to define a white-list of attr
protected $visible = ['first_name', 'last_name'];
}

#### Temporarily Exposing Hidden Properties

If you would like to make some typically hidden attributes visible on a given model instance, you may use the `makeVisible` method. The `makeVisible` method returns the model instance for convenient method chaining:

return $user->makeVisible('attribute')->toArray();

<a name="appending-values-to-json"></a>
## Appending Values To JSON

Expand Down

0 comments on commit b1d2932

Please sign in to comment.