mirror of
http://124.126.16.154:8888/singularity/hyperf-admin.git
synced 2026-01-15 05:35:08 +08:00
Update PermissionService.php
This commit is contained in:
@@ -388,4 +388,18 @@ class PermissionService
|
||||
}
|
||||
throw new \RuntimeException('Handler not exist.');
|
||||
}
|
||||
|
||||
public function getModules($router_ids)
|
||||
{
|
||||
if(!$router_ids) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return FrontRoutes::query()
|
||||
->select(['module'])
|
||||
->whereIn('id', $router_ids)
|
||||
->get()
|
||||
->pluck('module')
|
||||
->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user