title: laravel 5.6 datatable pagination not working
body: <p>I'm using laravel 5.6 and try to add pagination to bootstrap datatable. But it's not working.I got error.Please help me to find mistake I did.</p>
  
  <p><strong>Error</strong></p>
  
  <blockquote>
    <p>Method Illuminate\Database\Eloquent\Collection::links does not exist.</p>
  </blockquote>
  
  <p><strong>designation.blade.php(View)</strong></p>
  
  <pre><code> @if(count($designations)&gt;=1)
      &lt;table class="table table-dark" id="designationTable"&gt;
          &lt;thead&gt;
          &lt;tr&gt;
              &lt;th scope="col"&gt;#&lt;/th&gt;
              &lt;th scope="col"&gt;Designation Type&lt;/th&gt;
              &lt;th scope="col"&gt;Status&lt;/th&gt;
              &lt;th scope="col"&gt;Create At&lt;/th&gt;
              &lt;th scope="col"&gt;Action&lt;/th&gt;
  
          &lt;/tr&gt;
          &lt;/thead&gt;
          @foreach ($designations as $designation)
          &lt;tbody&gt;
          &lt;tr&gt;
              &lt;th scope="row"&gt;{{$designation-&gt;id}}&lt;/th&gt;
              &lt;td&gt;{{$designation-&gt;designation_type}}&lt;/td&gt;
              &lt;td&gt;{{$designation-&gt;status}}&lt;/td&gt;
              &lt;td&gt;{{$designation-&gt;created_at}}&lt;/td&gt;
              &lt;td&gt;
                &lt;button type="" class="btn btn-secondary" id="btn_update_designation"&gt;Update&lt;/button&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;/tbody&gt;
          @endforeach
      &lt;/table&gt;
      {{ $designations-&gt;links() }}
    @endif
  </code></pre>
  
  <p><strong>DesignationController.php</strong></p>
  
  <pre><code>namespace App\Http\Controllers;
  use App\Http\Controllers\Controller;
  use Illuminate\Http\Request;
  use DB;
  use App\Designation;
  
  class DesignationController extends Controller
  {
      public function index()
      {
         $designations = Designation::all();
         return view('pages.designation')-&gt;with('designations',$designations);
      }
  }
  </code></pre>