當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。