本文整理汇总了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}"));
}
示例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'));
}
}
示例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'));
}
示例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);
}
示例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'));
}
示例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'));
}
示例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);
}
示例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));
}
示例9: roles
public function roles()
{
$roles = Role::paginate(10);
return view('users/roles', compact('roles'));
}
示例10: index
/**
* Display a listing of the resource.
*
* @return void
*/
public function index()
{
$roles = Role::paginate(15);
return view('admin.roles.index', compact('roles'));
}