本文整理汇总了PHP中Illuminate\Database\Query\Builder::simplePaginate方法的典型用法代码示例。如果您正苦于以下问题:PHP Builder::simplePaginate方法的具体用法?PHP Builder::simplePaginate怎么用?PHP Builder::simplePaginate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Database\Query\Builder
的用法示例。
在下文中一共展示了Builder::simplePaginate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: simplePaginate
/**
* Get a paginator only supporting simple next and previous links.
*
* This is more efficient on larger data-sets, etc.
*
* @param int $perPage count of list
* @param array $columns get columns
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
*/
public function simplePaginate($perPage, array $columns = ['*'])
{
if ($this->dynamic === false) {
$this->query->simplePaginate($perPage, $columns);
}
if ($this->proxy === true) {
$this->query = $this->getProxyManager()->get($this->query);
}
return $this->query->simplePaginate($perPage, $columns);
}
示例2: simplePaginate
/**
* Get a paginator only supporting simple next and previous links.
*
* This is more efficient on larger data-sets, etc.
*
* @param int $perPage count of list
* @param array $columns get columns
* @param string $pageName page parameter name
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
*/
public function simplePaginate($perPage = 15, $columns = ['*'], $pageName = 'page')
{
if ($this->dynamic === false) {
parent::simplePaginate($perPage, $columns);
}
if ($this->proxy === true) {
$this->getProxyManager()->get($this);
}
return parent::simplePaginate($perPage, $columns);
}