Laravel's tap() helper

Submitted by phpScots - 9 months ago

Laravel's tap() is global helper function , that is used for improving the Laravel framework’s declarative capabilities.Tap() function is inspired from Ruby.Tap() simply takes $value and a $callback / anonymous function. The $callback will execute with the $value as the argument. And finally the $value will be returned.You can make changes in value in callback.

Read more from
comments powered by Disqus