I wonder if Laravel should use this technique by default. It seems to have a major positive impact on performance.
PHP
Quick tips: Sending Laravel output to Ray automatically
A handy overview of the Ray configuration options in Laravel. You can automatically send duplicate queries, slow queries, exceptions, and dump output straight to Ray without adding any ray() calls to your code. Read more