File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,13 @@ function fetchPermissions(int $status = null) : Object
243243 return $ permissions ;
244244}
245245
246+ function fetchPermission (int $ permission_id ) : Object | null
247+ {
248+ $ permission = \Obrainwave \AccessTree \Models \Permission::find ($ permission_id );
249+
250+ return $ permission ;
251+ }
252+
246253function fetchRoles (int $ status = null ) : Object
247254{
248255 if ($ status == null )
@@ -255,6 +262,13 @@ function fetchRoles(int $status = null) : Object
255262 return $ roles ;
256263}
257264
265+ function fetchRole (int $ role_id ) : Object | null
266+ {
267+ $ role = \Obrainwave \AccessTree \Models \Role::find ($ role_id );
268+
269+ return $ role ;
270+ }
271+
258272function fetchUserRoles (int $ user_id ) : Object
259273{
260274 $ user_roles = $ roles = \Obrainwave \AccessTree \Models \UserRole::where ('user_id ' , $ user_id )->get ();
You can’t perform that action at this time.
0 commit comments