server/src/app/Repositories/RdfDocumentRepository.php
changeset 22 a50cbd7d702f
parent 20 a9b98b16b053
child 28 b0b56e0f8c7f
equal deleted inserted replaced
21:01e7e6a17317 22:a50cbd7d702f
   126      *
   126      *
   127      * @param  int  $perPage
   127      * @param  int  $perPage
   128      * @param  string  $pageName
   128      * @param  string  $pageName
   129      * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
   129      * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
   130      */
   130      */
   131     public function paginateAll($perPage = 15, $pageName = 'page')
   131     public function paginateAll($perPage = 15, $pageName = 'page', $page = null)
   132     {
   132     {
   133         assert(is_numeric($perPage));
   133         assert(is_numeric($perPage));
   134 
   134 
   135         $page = Paginator::resolveCurrentPage($pageName);
   135         if(is_null($page)) {
       
   136             $page = Paginator::resolveCurrentPage($pageName);
       
   137         }
   136 
   138 
   137         assert(is_null($page) || is_numeric($page));
   139         assert(is_null($page) || is_numeric($page));
   138 
   140 
   139         $total = $this->getCount();
   141         $total = $this->getCount();
   140 
   142