mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
增加打印sql方法
This commit is contained in:
parent
04cf5d4df4
commit
e77ab14af1
@ -23,6 +23,7 @@ use app\services\system\lang\LangCodeServices;
|
||||
use app\services\system\lang\LangCountryServices;
|
||||
use think\facade\Config;
|
||||
use think\facade\Log;
|
||||
use think\facade\Db;
|
||||
|
||||
if (!function_exists('crmebLog')) {
|
||||
/**
|
||||
@ -1090,3 +1091,19 @@ if (!function_exists('out_push')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('dump_sql')) {
|
||||
/**
|
||||
* 默认数据推送
|
||||
* @param string $pushUrl
|
||||
* @param array $data
|
||||
* @param string $tip
|
||||
* @return bool
|
||||
*/
|
||||
function dump_sql()
|
||||
{
|
||||
Db::listen(function ($sql) {
|
||||
var_dump($sql);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user