本文整理匯總了PHP中app\Permission::paginate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Permission::paginate方法的具體用法?PHP Permission::paginate怎麽用?PHP Permission::paginate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\Permission
的用法示例。
在下文中一共展示了Permission::paginate方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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} = Permission::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 \Illuminate\Http\Response
*/
public function index()
{
if (Gate::denies('permission.read')) {
return view(config('app.template') . '.error.403');
}
$limit = 20;
$data = ['limit' => $limit, 'permissions' => Permission::paginate($limit)->setPath('permission')];
return view(config('app.template') . '.permission.table', $data);
}
示例3: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
//
$q = \Request::get('q');
if ($q != '') {
$permissions = \App\Permission::where('name', 'RLIKE', $q)->paginate(10);
} else {
$permissions = \App\Permission::paginate(10);
}
return view('permissions.index', compact('permissions', 'q'));
}
示例4: index
public function index()
{
$permissions = Permission::paginate(15);
return view('admin.permission.index', compact('permissions'));
}
示例5: index
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$permissions = Permission::paginate(5);
return view('pages.admin_pages.permissions')->with('permissions', $permissions);
}