Derek MacDonald explains how to use the new Laravel 5's helper function: tap().

Laravel function tap