title: Laravel Paginate not working
body: <p>I was trying to paginate some data with Query builder with the following query. </p>
  
  <pre><code>public function productSearch(Request $request)
  {
       $name = $request-&gt;name; 
       $products = DB::table('products')                  
           -&gt;where('name', 'LIKE', "%$name%")             
           -&gt;paginate(4);
  
       return view('product',compact('products');
  }
  </code></pre>
  
  <p>But when I tried to show the pagination in the view page with the following line</p>
  
  <pre><code>{{ $products-&gt;links() }}
  </code></pre>
  
  <p>It shows </p>
  
  <blockquote>
    <p>Method links does not exist</p>
  </blockquote>
  
  <p>What could the possible error be since the pagination does not show?</p>