Skip to content

Commit

Permalink
[5.8] added Tappable trait documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet authored and gdebrauwer committed Jun 20, 2019
1 parent 38182a5 commit 4cee365
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -1658,6 +1658,8 @@ If no Closure is passed to the `tap` function, you may call any method on the gi
'email' => $email,
]);

If you prefer to call the `tap` function on an instance over calling the global helper, you can add it to your own classes by using the `\Illuminate\Support\Traits\Tappable` trait. The `tap` function of this trait only takes one argument: a Closure. The instance itself will be passed to this Closure and then be returned by the `tap` function.

<a name="method-throw-if"></a>
#### `throw_if()` {#collection-method}

Expand Down

0 comments on commit 4cee365

Please sign in to comment.