use Illuminate\Support\Facades\DB;


DB::enableQueryLog();
// 要执行的SQL
dump(DB::getQueryLog());