http://stackoverflow.com/questions/14536165/get-the-query-executed-in-laravel-3-4
public static function q($all = true)
{
$queries = DB::getQueryLog();
if ($all == false) {
$last_query = end($queries);
return $last_query;
}
return $queries;
}
没用 空array,来点方便的方法吧!
1
dawn009 Aug 9, 2014
我用DB自带的Log
|
2
WildCat Aug 9, 2014 via iPhone
Laravel debug bar
|
3
WildCat Aug 9, 2014
|