當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Role::paginate方法代碼示例

本文整理匯總了PHP中app\Role::paginate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Role::paginate方法的具體用法?PHP Role::paginate怎麽用?PHP Role::paginate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\Role的用法示例。


在下文中一共展示了Role::paginate方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $title = $this->title;
     $module_name = $this->module_name;
     $module_icon = $this->module_icon;
     $page_heading = "All " . $module_name;
     ${$module_name} = Role::paginate(5);
     return view("backend.{$module_name}.index", compact('title', 'page_heading', 'module_icon', "module_name", "{$module_name}"));
 }
開發者ID:nasirkhan,項目名稱:laravel-5-starter,代碼行數:14,代碼來源:RolesController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     if (Auth::user()->role_id != 1) {
         return redirect('home');
         Session::flash('flash_message', 'Nie masz do tego uprawnień');
     } else {
         $role = Role::paginate(15);
         return view('role.index', compact('role'));
     }
 }
開發者ID:ArturKami,項目名稱:NewPraktyki,代碼行數:15,代碼來源:RoleController.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     $q = \Request::get('q');
     if ($q != '') {
         $roles = \App\Role::where('name', 'RLIKE', $q)->paginate(10);
     } else {
         $roles = \App\Role::paginate(10);
     }
     return view('roles.index', compact('roles', 'q'));
 }
開發者ID:afdalwahyu,項目名稱:lnms,代碼行數:16,代碼來源:RolesController.php

示例4: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $roles = Role::paginate(1);
     return view('pages.admin_pages.roles')->with('roles', $roles);
 }
開發者ID:abreban,項目名稱:RGU,代碼行數:10,代碼來源:RolesCOntroller.php

示例5: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //        $roles = Role::all();
     $roles = Role::paginate(env('PAGINATION_MAX'));
     return view('backend.roles.index', compact('roles'));
 }
開發者ID:petrovitch,項目名稱:smoothing,代碼行數:11,代碼來源:RolesController.php

示例6: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // $models = Role::orderBy('name', 'desc')->paginate(10);
     $models = Role::paginate(10);
     return view('admin.role.index', compact('models'));
 }
開發者ID:Ravend6,項目名稱:laravel_base_v5.2,代碼行數:11,代碼來源:RoleController.php

示例7: index

 /**
  * Display a listing of the resource.
  *
  * @param RoleRequest $request
  * @return \Illuminate\Http\JsonResponse
  */
 public function index(RoleRequest $request)
 {
     $roles = Role::paginate(getPerPage());
     return $this->response->ok($roles);
 }
開發者ID:Virgeto,項目名稱:GG-enginering-backend,代碼行數:11,代碼來源:RolesController.php

示例8: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $roles = Role::paginate(8);
     $permisos = Permission::all();
     return View::make('template.role.role', array('roles' => $roles, 'permisos' => $permisos));
 }
開發者ID:jumaya,項目名稱:redbpim,代碼行數:11,代碼來源:RolesController.php

示例9: roles

 public function roles()
 {
     $roles = Role::paginate(10);
     return view('users/roles', compact('roles'));
 }
開發者ID:jtoshmat,項目名稱:laravel,代碼行數:5,代碼來源:UsersController.php

示例10: index

 /**
  * Display a listing of the resource.
  *
  * @return void
  */
 public function index()
 {
     $roles = Role::paginate(15);
     return view('admin.roles.index', compact('roles'));
 }
開發者ID:appzcoder,項目名稱:laravel-admin,代碼行數:10,代碼來源:RolesController.php


注:本文中的app\Role::paginate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。