mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-08-30 12:45:32 +08:00
Merge branch 'master' of https://github.com/top-think/framework
This commit is contained in:
@@ -1386,7 +1386,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
protected function getForeignKey($name)
|
||||
{
|
||||
if (strpos($name, '\\')) {
|
||||
$name = basename(str_replace('\\', '/', $model));
|
||||
$name = basename(str_replace('\\', '/', $name));
|
||||
}
|
||||
return Loader::parseName($name) . '_id';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user