How Do I Get the Query Builder to Output Its Raw SQL Query as a String?
To output to the screen the last queries run you can utilize this:
DB::enableQueryLog(); // Enable query log // Your Eloquent query executed by using get() dd(DB::getQueryLog()); // Show results of log
I believe the most recent queries will be at the bottom of the array.
The Output Will be Look Like This
array:1 [▼ 0 => array:3 [▼ "query" => "select * from `users`" "bindings" =>  "time" => 414.66 ] ]