Browse Source

优化 Menu.php getAuthRulePK 方法

Amor 8 years ago
parent
commit
8e29c5f9c7
1 changed files with 1 additions and 2 deletions
  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) {
     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;
     }
     }
 
 
 }
 }