mirror of https://gitee.com/karson/fastadmin.git
优化 Menu.php getAuthRulePK 方法
parent
732dd19efd
commit
8e29c5f9c7
|
|
@ -277,12 +277,11 @@ class Menu extends Command
|
||||||
protected function getAuthRulePK($name) {
|
protected function getAuthRulePK($name) {
|
||||||
if (!empty($name))
|
if (!empty($name))
|
||||||
{
|
{
|
||||||
$PK = $this->model
|
return $this->model
|
||||||
->where('name', $name)
|
->where('name', $name)
|
||||||
->value('id');
|
->value('id');
|
||||||
|
|
||||||
}
|
}
|
||||||
return $PK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue