How to get the raw SQL query from the query builder in Laravel
< 1 min readTo get the SQL query from the query builder in Laravel as string, you can use the toSql() method on the query builder instance. For Example: you want to get the raw SQL query for the following.
