当前位置: 首页>>代码示例>>PHP>>正文


PHP Role::orderBy方法代码示例

本文整理汇总了PHP中Role::orderBy方法的典型用法代码示例。如果您正苦于以下问题:PHP Role::orderBy方法的具体用法?PHP Role::orderBy怎么用?PHP Role::orderBy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Role的用法示例。


在下文中一共展示了Role::orderBy方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create

 /**
  * Show the form for creating a new resource.
  * GET /users/create
  *
  * @return Response
  */
 public function create()
 {
     $pagetitle = 'Create User';
     $departments = Department::orderBy('department')->lists('department', 'id');
     $roles = Role::orderBy('name')->lists('name', 'id');
     return View::make('user.create', compact('pagetitle', 'departments', 'roles'));
 }
开发者ID:jcyanga28,项目名称:project-reference,代码行数:13,代码来源:UsersController.php

示例2: getLookup

 static function getLookup()
 {
     $role = new Role();
     $role->orderBy('name');
     $role->find();
     $roleList = array();
     while ($role->fetch()) {
         $roleList[$role->roleId] = $role->name . ' - ' . $role->description;
     }
     return $roleList;
 }
开发者ID:bryandease,项目名称:VuFind-Plus,代码行数:11,代码来源:Role.php

示例3: permission_index

 public function permission_index()
 {
     $president_id = Auth::user()->id;
     $users = User::with('AssigmentRole')->with('Neighbors')->paginate(10);
     $president_urbanism = Neighbors::with('NeighborProperty')->findOrFail($president_id);
     foreach ($president_urbanism->NeighborProperty as $row) {
         $urbanism_id = $row->urbanism_id;
         $neighbors = NeighborProperty::where('urbanism_id', '=', $urbanism_id)->get();
     }
     $roles = Role::orderBy('id', 'ASC')->lists('name', 'id');
     return View::make('dashboard.admin.permission.index', ['select' => ['' => 'Seleccione'], 'neighbors' => $neighbors, 'roles' => $roles, 'users' => $users]);
 }
开发者ID:prianticonsulting,项目名称:Habitaria,代码行数:12,代码来源:AdminController.php

示例4: getView

 public function getView($id)
 {
     User::onlyHas('user-edit');
     $this->data['user'] = User::find($id);
     $this->data['roles'] = Role::orderBy('key', 'asc')->get();
     if ($this->data['user']) {
         $this->layout->content = View::make('sections.user.view', $this->data);
         return $this->layout;
     } else {
         throw new Exception("User not found");
     }
 }
开发者ID:vcorobceanu,项目名称:WebAPL,代码行数:12,代码来源:UserController.php

示例5: getRolePermission

 /**
  * get the Filemanager
  *
  * @return Response
  */
 public function getRolePermission()
 {
     //User
     $data['user'] = Auth::user();
     //Roles
     $data['roles'] = Role::orderBy('name', 'ASC')->get();
     //Interface
     $data['noAriane'] = true;
     if (Request::ajax()) {
         return Response::json(View::make('theme::' . 'admin.role_permission.index', $data)->renderSections());
     } else {
         return View::make('theme::' . 'admin.role_permission.index', $data);
     }
 }
开发者ID:Metrakit,项目名称:dynamix,代码行数:19,代码来源:AdminController.php

示例6: _list

 public function _list($page = 1, $searchString = null)
 {
     if (!empty($searchString)) {
         $roles = Role::where('ime', 'like', '%' . $searchString . '%')->orderBy('ime');
     } else {
         $roles = Role::orderBy('ime');
     }
     if ($page != 1) {
         Paginator::setCurrentPage($page);
     }
     $roles = $roles->paginate(10);
     $v = View::make('Role.list')->with('roles', $roles);
     if (Request::ajax()) {
         return $v->renderSections()['list'];
     }
     return $v;
 }
开发者ID:Firtzberg,项目名称:Edu,代码行数:17,代码来源:RoleController.php

示例7: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $roles = Role::orderBy('name')->get();
     return View::make("admin.role.list", array("roles" => $roles));
 }
开发者ID:elioth010,项目名称:carretilla_online,代码行数:10,代码来源:RoleController.php

示例8: manageprivilleges

 public static function manageprivilleges($id)
 {
     $pagetitle = 'Update User Role';
     $user_id = $id;
     $selectrole = DB::table('assigned_roles')->where('user_id', $id)->first();
     $myrole = DB::table('roles')->where('id', $selectrole->role_id)->first();
     $roles = Role::orderBy('name')->where('id', '!=', $myrole->id)->lists('name', 'id');
     return View::make('user.roleedit', compact('pagetitle', 'myrole', 'roles', 'user_id'));
 }
开发者ID:jcyanga28,项目名称:project-reference,代码行数:9,代码来源:RoleController.php

示例9: registro

 public function registro()
 {
     $perfiles = Role::orderBy('name')->get();
     $this->array_view['perfiles'] = $perfiles;
     return View::make($this->folder_name . '.registro', $this->array_view);
 }
开发者ID:tatu-carreta,项目名称:mariasanti_v2,代码行数:6,代码来源:UsuarioController.php

示例10: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit(General $general, User $user)
 {
     $theme = $general->theme();
     if ($user->id == Auth::user()->id) {
         return redirect('/admin/user/' . $user->id);
     }
     dd($user);
     $roles = Role::orderBy('level')->lists('name', 'id');
     $theme['title'] = 'Edit User';
     $theme['description'] = 'edit user entry';
     $button_text = 'Update User';
     return view('admin.group.edit', compact('theme', 'group', 'roles', 'button_text'));
 }
开发者ID:ronal2do,项目名称:Laravel-CMS,代码行数:19,代码来源:UserController.php

示例11: getRolesOrdered

 public static function getRolesOrdered($pagination = 10)
 {
     return Role::orderBy('id', 'desc')->paginate($pagination);
 }
开发者ID:rituzy,项目名称:iblog,代码行数:4,代码来源:Role.php


注:本文中的Role::orderBy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。