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
56
56
*/
57
57
public static function client (?string $ driver = null ): Enforcer
58
58
{
59
+ $ driver = $ driver ?? config ('plugin.casbin.webman-permission.permission.default ' );
60
+ $ config = config ('plugin.casbin.webman-permission.permission. ' .$ driver );
61
+
59
62
if (isset (static ::$ _manager [$ driver ])){
60
63
return static ::$ _manager [$ driver ];
61
64
}
62
65
63
- $ driver = $ driver ?? config ('plugin.casbin.webman-permission.permission.default ' );
64
- $ config = config ('plugin.casbin.webman-permission.permission. ' .$ driver );
65
66
$ model = new Model ();
66
67
if ('file ' == $ config ['model ' ]['config_type ' ]) {
67
68
$ model ->loadModel ($ config ['model ' ]['config_file_path ' ]);
@@ -90,4 +91,4 @@ public static function __callStatic($name, $arguments)
90
91
{
91
92
return self ::client ()->{$ name }(...$ arguments );
92
93
}
93
- }
94
+ }
You can’t perform that action at this time.
0 commit comments