src/BaseRepositoryEloquent.php
public function paginate($perPage = 15, $page = null, $attributes = ['*'])
    {
        $pagelo = new PageLimitOffset($perPage, $page);

        return $this->limit($pagelo->limit())
            ->offset($pagelo->offset())
            ->get($attributes);
    }
public function paginate($perPage = 15, $page = null, $attributes = ['*'])
    {
        $pagelo = new PageLimitOffset($perPage, $page);

        return $this->limit($pagelo->limit())
            ->offset($pagelo->offset())
            ->get($attributes);
    }
public function paginate ( $ perPage = 15 , $ page = null , $ attributes = [ '*' ] ) { $ pagelo = new PageLimitOffset ( $ perPage , $ page ) ; return $ this -> limit ( $ pagelo -> limit ( ) ) -> offset ( $ pagelo -> offset ( ) ) -> get ( $ attributes ) ; }
Return a collection of models by paginated approach.

@param  int                                      $perPage
@param  int|null                                 $page
@param  array                                    $attributes
@return \Illuminate\Database\Eloquent\Collection
Return a collection of models by paginated approach .