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


PHP Paginator::appends方法代码示例

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


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

示例1: paginatedCollection

 public function paginatedCollection(Paginator $paginator, $transformer = null, $resourceKey = null)
 {
     $paginator->appends(\Request::query());
     $resource = new Collection($paginator->getCollection(), $this->getTransformer($transformer), $resourceKey);
     $resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
     return $this->manager->createData($resource)->toArray();
 }
开发者ID:huglester,项目名称:larasponse,代码行数:7,代码来源:Fractal.php

示例2: preparePagination

 /**
  * Prepare query for pagination
  *
  * @return $this
  */
 protected function preparePagination()
 {
     $this->setQuerySortable();
     // set paginator
     $this->paginator = $this->getQuery()->paginate($this->getPerPage());
     $this->paginator->appends(Request::except('ajax'));
     return $this;
 }
开发者ID:reillo,项目名称:grid,代码行数:13,代码来源:Grid.php

示例3: links

 /**
  * @param string $view
  *
  * @return mixed
  */
 public function links($view = null)
 {
     if ($this->limit) {
         if ($this->hash != '')
             return $this->paginator->appends($this->url->remove('page')->getArray())->fragment($this->hash)->render($view);
         else
             return $this->paginator->appends($this->url->remove('page')->getArray())->render($view);
     }
 }
开发者ID:simplylouis,项目名称:online_book_shop_20151110_laravel_5,代码行数:14,代码来源:DataSet.php

示例4: links

 /**
  * @param string $view
  *
  * @return mixed
  */
 public function links($view = null)
 {
     if ($this->limit) {
         if ($this->hash != '') {
             $links = $this->paginator->appends($this->url->remove('page' . $this->cid)->getArray())->fragment($this->hash)->render($view);
         } else {
             $links = $this->paginator->appends($this->url->remove('page' . $this->cid)->getArray())->render($view);
         }
         return str_replace('/?', '?', $links);
     }
 }
开发者ID:Dnishche,项目名称:fispm,代码行数:16,代码来源:DataSet.php

示例5:

 /**
  * Flexible pagination links.
  *
  * @param Paginator $data
  * @return mixed
  */
 function pagination_links(Paginator $data)
 {
     if ($query = request()->query()) {
         $query = array_except($query, 'page');
         return $data->appends($query)->links();
     }
     return $data->links();
 }
开发者ID:gravitano,项目名称:helpers,代码行数:14,代码来源:helpers.php

示例6: paginate

 /**
  * Use a custom pagination style.
  */
 public function paginate(Paginator $model) : string
 {
     return with(new SemanticUIPagination($model->appends($this->request->query())))->render();
 }
开发者ID:atorscho,项目名称:laravel-helpers,代码行数:7,代码来源:Miscellaneous.php


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