/**
  * @param int|null $group
  *
  * @return \Illuminate\View\View
  */
 public function index($group = null)
 {
     $this->switchGroup($group);
     $groups = RoleGroup::orderBy('id')->get();
     $roles = $this->group->roles()->orderBy('level')->with('users')->get();
     $current = $this->group;
     $this->buildHeading([trans('access-control::role.manage'), "[{$this->group->name}]"], 'fa-male', ['#' => trans('access-control::role.role')]);
     return view('access-control::role.index', compact('roles', 'groups', 'current'));
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param \Minhbang\AccessControl\Models\RoleGroup $role_group
  *
  * @return \Symfony\Component\HttpFoundation\Response
  * @throws \Exception
  */
 public function destroy(RoleGroup $role_group)
 {
     $role_group->delete();
     return response()->json(['type' => 'success', 'content' => trans('common.delete_object_success', ['name' => trans('access-control::role_group.role_group')])]);
 }