Print the sql statement and output it directly after you execute the SQL statement
Method 1:
$queries = DB::getQueryLog();
$a = end($queries);
$tmp = str_replace('?', '"'.'%s'.'"', $a["query"]);
echo vsprintf($tmp, $a['bindings']);
exit;
Method 2: Pay attention to put it above routes.php
Event::listen('illuminate.query',function($query){
var_dump($query);
});