Exemplo n.º 1
0
 /**
  * 视图:团队职务
  *
  * @param $id
  */
 public function getGroup($id)
 {
     //查询所有职务
     $groupAll = AdminGroup::orderBy('cp_group_id', 'ASC')->get();
     //获取该职务信息
     $adminGroup = AdminGroup::find($id);
     //获取菜单权限列表
     $menuList = $this->getMenuList();
     //获取职务权限
     $adminAccessList = AdminAccess::where('cp_group_id', '=', $id)->get();
     $groupAccess = array();
     foreach ($adminAccessList as $adminAccess) {
         $groupAccess[] = $adminAccess->access;
     }
     $this->assign('groupAll', $groupAll);
     $this->assign('adminGroup', $adminGroup);
     $this->assign('menuList', $menuList);
     $this->assign('groupAccess', $groupAccess);
     return $this->display('admin.perm.group');
 }
Exemplo n.º 2
0
 /**
  * 视图:修改用户信息
  *
  * @param $id
  * @return \Illuminate\View\View
  */
 public function getEdit($id)
 {
     $user = User::find($id);
     //查询所有职务
     $groupAll = AdminGroup::orderBy('cp_group_id', 'ASC')->get();
     $this->assign('groupAll', $groupAll);
     $this->assign('user', $user);
     return $this->display('admin.user.edit');
 }