fixed:模型name属性多加了表前缀

This commit is contained in:
JaguarJack
2020-12-01 17:55:36 +08:00
parent 94c430f491
commit 35445f37e1
2 changed files with 16 additions and 1 deletions

View File

@@ -151,6 +151,18 @@ class Utils
return \config('database.connections.mysql.prefix');
}
/**
* 删除前缀
*
* @time 2020年12月01日
* @param string $table
* @return string|string[]
*/
public static function tableWithoutPrefix(string $table)
{
return str_replace(self::tablePrefix(), '', $table);
}
/**
* 是否是超级管理员
*