title: Laravel pagination not working with array instead of collection
body: <p>I'm trying to paginate an array data set and it has proven more challenging than I thought.</p>
  
  <p>I'm using Laravel 5</p>
  
  <p>So I have an abstract interface/repository that all my other models extend to and I created a method inside my abstract repository call paginate.
  I've included both </p>
  
  <p><code>use Illuminate\Pagination\Paginator;</code></p>
  
  <p>and</p>
  
  <p><code>use Illuminate\Pagination\LengthAwarePaginator;</code></p>
  
  <p><strong>Here is the method</strong></p>
  
  <pre><code>  public function paginate($items,$perPage,$pageStart=1)
      {
  
          // Start displaying items from this number;
          $offSet = ($pageStart * $perPage) - $perPage; 
  
          // Get only the items you need using array_slice
          $itemsForCurrentPage = array_slice($items, $offSet, $perPage, true);
  
          return new LengthAwarePaginator($itemsForCurrentPage, count($items), $perPage,Paginator::resolveCurrentPage(), array('path' =&gt; Paginator::resolveCurrentPath()));
      }
  </code></pre>
  
  <p>So as you can imagine this function accepts an array of <code>$items</code> a <code>$perPage</code> variable that indicates how many to items to paginate and a <code>$pageStart</code> that indicates from which page to start.</p>
  
  <p>The pagination works and I can see <code>LengthAwarePaginator</code> instance when I'm doing a <code>dd()</code> , all of it's values seem fine. </p>
  
  <p>The problem starts when I'm displaying the results.</p>
  
  <p>When I do <code>{!! $instances-&gt;render() !!}</code> The paginator links display's fine, the <code>page</code> parameter changes according to links but the data is not changing.
  Data is the same in every page. When I'm using Eloquent for example <code>Model::paginate(3)</code> everything works fine, but when I <code>dd()</code> this <code>LengthAwarePaginator</code> it's identical to the <code>LengthAwarePaginator</code> instance of  my custom paginator with the exception that it paginates an array ofcourse and not a collection.</p>