Update PermissionService.php

This commit is contained in:
jyiL
2020-10-28 18:01:49 +08:00
committed by GitHub
parent a9c5c309e7
commit 0b7fac4304

View File

@@ -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();
}
}