laravel打印getLastSql
DB::connection()->enableQueryLog(); //SQL语句 $queries = DB::getQueryLog(); $query = end($queries); print_r($query);
DB::connection()->enableQueryLog(); //SQL语句 $queries = DB::getQueryLog(); $query = end($queries); print_r($query);