當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。