fixed:模型name属性多加了表前缀
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是超级管理员
|
||||
*
|
||||
|
Reference in New Issue
Block a user