浏览代码

优化 Menu.php getAuthRulePK 方法

Amor 8 年之前
父节点
当前提交
8e29c5f9c7
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      application/admin/command/Menu.php

+ 1 - 2
application/admin/command/Menu.php

@@ -277,12 +277,11 @@ class Menu extends Command
     protected function getAuthRulePK($name) {
         if (!empty($name))
         {
-            $PK = $this->model
+            return $this->model
                             ->where('name', $name)
                             ->value('id');
 
         }
-        return $PK;
     }
 
 }