title: Laravel - Paginate and get()
body: <p>With the code below, what I wanted was paginate the query I created. But, when I try to add paginate after get, it throws an error. I wanted to remain get since I want to limit to columns that was set on $fields.
  What would should be the better idea to paginate this thing? or what's a good substitute for get and limit the columns?</p>
  
  <p>What I tried:</p>
  
  <pre><code>-&gt;get($this-&gt;fields)-&gt;paginate($this-&gt;limit)
  </code></pre>
  
  <p>Part of my controller:</p>
  
  <pre><code>class PhonesController extends BaseController {
  
      protected $limit = 5;
      protected $fields = array('Phones.*','manufacturers.name as manufacturer');
      /**
       * Display a listing of the resource.
       *
       * @return Response
       */
      public function index()
      {
  
  
  
          if (Request::query("str")) {
              $phones = Phone::where("model", 'LIKE', '%'. Request::query('str') . '%')
                          -&gt;join('manufacturers', 'manufacturers_id', '=', 'manufacturers.id')
                          -&gt;get($this-&gt;fields);
  
          } else {
              $phones = Phone::join('manufacturers', 'manufacturers_id', '=', 'manufacturers.id')
                              -&gt;get($this-&gt;fields);
          }
  
  
  
          return View::make('phones.index')-&gt;with('phones', $phones);
      }
  </code></pre>
  
  <p>}</p>