Published On Aug. 14th 2017

What's New in Laravel 5.5: Higher Order Tap

Episode 13 Run Time 8:12

Download

The tap() helper function has now been supercharged to be even more flexible. You may omit the closure second argument to this function, in which case a proxy class will be returned. This proxy will properly delegate to any method you call from that point forward, while returning your original value per usual. It sounds a bit confusing on paper, but you'll get a lot of use out of this one.

Please note that this update to tap() is also available in fresh 5.4 installs.