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


PHP Role::lists方法代码示例

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


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

示例1: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $user = $this->user->find($id);
     if (is_null($user)) {
         return Redirect::route('users.index');
     }
     $role_options = Role::lists('role_name', 'id');
     return View::make('users.edit', compact('user', 'role_options'));
 }
开发者ID:hendryguna,项目名称:laravel-basic,代码行数:15,代码来源:UsersController.php

示例2: users

 public function users()
 {
     $users = \User::all();
     $deleted_users = \User::onlyTrashed()->lists('username', 'id');
     $suspended_users = \Throttle::where('suspended', 1)->count();
     $banned_users = \Throttle::where('banned', 1)->lists('user_id', 'user_id');
     $users_list = \User::all()->lists('username', 'id');
     $roles_list = \Role::lists('name', 'id');
     return \View::make('admin.users', compact('users', 'deleted_users', 'suspended_users', 'users_list', 'banned_users', 'roles_list'));
 }
开发者ID:pogliozzy,项目名称:larabase,代码行数:10,代码来源:UsersController.php

示例3: editUserView

 public function editUserView($username)
 {
     if (User::where('username', $username)->exists()) {
         $roles = Role::lists('name', 'id');
         $user = User::where('username', $username)->first();
         return View::make('admin.edituser')->with(['user' => $user, 'roles' => $roles]);
     }
     App::abort(404);
     //TODO: Add Error Message(There is no user found by given username)
 }
开发者ID:Acikteknoloji,项目名称:acikteknoloji,代码行数:10,代码来源:AdminController.php

示例4: employee

 public function employee()
 {
     $ids = DB::table('tblEmployees')->select('strEmpID')->orderBy('updated_at', 'desc')->orderBy('strEmpID', 'desc')->take(1)->get();
     $ID = $ids["0"]->strEmpID;
     $newID = $this->smart($ID);
     $ids2 = DB::table('tblLogin')->select('strUsername')->orderBy('strUsername', 'desc')->take(1)->get();
     $ID2 = $ids2["0"]->strUsername;
     $newID2 = $this->smart($ID2);
     // Get all products from the database
     $employees = Employee::all();
     $branches = Branch::lists('strBrchName', 'strBrchID');
     $roles = Role::lists('strRoleDescription', 'strRoleID');
     $data = array('employees' => $employees, 'branches' => $branches, 'roles' => $roles);
     return View::make('employee')->with('data', $data)->with('newID', $newID)->with('newID2', $newID2);
 }
开发者ID:ExperimentalGroup,项目名称:inventoryfinal,代码行数:15,代码来源:HomeController.php

示例5: edit

 public function edit($id)
 {
     $user = User::find($id);
     $status = ['1' => 'Aktif', '0' => 'Tidak Aktif'];
     $roles = Role::lists('name', 'id');
     return View::make('users.edit', compact('user', 'roles', 'status'));
 }
开发者ID:arbuuuud,项目名称:gnt-aops,代码行数:7,代码来源:UsersController.php

示例6: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $roles_data = Role::lists("name", "id");
     return View::make('admin.user.create_invitation')->with('roles_data', $roles_data);
 }
开发者ID:mertindervish,项目名称:registerbg,代码行数:10,代码来源:AdminInvitationController.php

示例7: anyCreate

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function anyCreate()
 {
     $roles = Role::lists('name', 'id');
     return $this->render('users.create', compact('cont', 'roles'));
 }
开发者ID:ryzr,项目名称:bootlegcms,代码行数:10,代码来源:UsersController.php

示例8: filterRoles

 public function filterRoles()
 {
     if ($this->role->role == 'All') {
         $ec = Role::lists('role', 'id');
     } else {
         $ec = Role::where('role', '<>', 'All')->lists('role', 'id');
     }
     return $ec;
 }
开发者ID:amcfarlane1251,项目名称:lcnsMgmt,代码行数:9,代码来源:User.php

示例9: getAddroleindex

 /**
  * @param $id
  * @return \Illuminate\View\View
  */
 public function getAddroleindex($id)
 {
     $person = People::findOrFail($id);
     $roles = Role::lists('name_rol', 'id');
     $branches = Branch::lists('name', 'id');
     return view('admin.addroles.addrole', compact('person', 'roles', 'branches'));
 }
开发者ID:EstebanJesus,项目名称:bancopedagogico-v2,代码行数:11,代码来源:PeopleTraits.php

示例10: edit

 /**
  * Show the form for editing the specified post.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     if (Auth::user()->role_id == 3 and Auth::user()->id != $id) {
         $user = User::find(Auth::user()->id);
         $roles = Role::lists('nombre', 'id');
         return View::make('users.edit', compact('user'))->with('roles', $roles);
     } else {
         $user = User::find($id);
         $roles = Role::lists('nombre', 'id');
         return View::make('users.edit', compact('user'))->with('roles', $roles);
     }
 }
开发者ID:awdesarrollos,项目名称:appshop,代码行数:18,代码来源:UsersController.php


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