laravel 輸出sql

hikarusun發表於2015-09-22
$queries = DB::getQueryLog();
 
$a = end($queries);
 
$tmp = str_replace('?', '"'.'%s'.'"', $a["query"]);
 
echo vsprintf($tmp, $a['bindings']);
 
exit;

  

相關文章