You can output the raw query for an Active Record Query by tagging .explain at the end. Very useful for complex queries where it’s hard to understand what is happening under the hood 🤯. You can read the docs for more info.
If you’re like me and like to use select statements to return specific columns. You’ll be happy to know that Eloquent allow you to use select column as alias just like in SQL. Which can be make things a breeze, depending on what you are doing. Remember to use the dot syntax to specify a … Read more