File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -56,12 +56,13 @@ class Permission
5656 */
5757 public static function client (?string $ driver = null ): Enforcer
5858 {
59+ $ driver = $ driver ?? config ('plugin.casbin.webman-permission.permission.default ' );
60+ $ config = config ('plugin.casbin.webman-permission.permission. ' .$ driver );
61+
5962 if (isset (static ::$ _manager [$ driver ])){
6063 return static ::$ _manager [$ driver ];
6164 }
6265
63- $ driver = $ driver ?? config ('plugin.casbin.webman-permission.permission.default ' );
64- $ config = config ('plugin.casbin.webman-permission.permission. ' .$ driver );
6566 $ model = new Model ();
6667 if ('file ' == $ config ['model ' ]['config_type ' ]) {
6768 $ model ->loadModel ($ config ['model ' ]['config_file_path ' ]);
@@ -90,4 +91,4 @@ public static function __callStatic($name, $arguments)
9091 {
9192 return self ::client ()->{$ name }(...$ arguments );
9293 }
93- }
94+ }
You can’t perform that action at this time.
0 commit comments