This post has been migrated and imported into different systems over the years, I have not had a chance to format this post manually so it may be hard to read but I have left it here as a reference.
Sometimes when working with Laravel it can be nice to see the actual query that you are generating, especially if you are dealing with really large queries. It surprised me how easy this is to do in Laravel as explained in this post https://scotch.io/tutorials/debugging-queries-in-laravel.
Basically all we need to do is replace ‘->get()’ at the end of our statement with ‘->toSql()’ which will print our statement.
Did my post help in some way? Feel free to get me something on Amazon!
The wishlist should be displayed below but sometimes it gets blocked by adblock, if that is the case you can find it here