How to get query builder to output its raw SQL query as a string in Laravel?
Published by on
Learn how to get the raw SQL string from a query builder in Laravel the easy way. Get to know this information to inspect the query used to retrieve the data.
You could also use ray($query) to see the query in Ray.
Nick Houtman shares how AI is reshaping UX work: clients arrive with better prototypes, common patterns get safer and more generic, and real research still matters most. Read more
Laravel now supports attaching arbitrary metadata to routes, and the latest laravel-flare client shows that context in error reports and performance traces. Read more
A deep dive into Laravel Context, from request metadata and automatic log enrichment to hidden context, scoped values, queues, scheduled commands, and internals. Read more