title: manual pagination of raw queries laravel
body: <p>Am trying to create manual pagination for raw queries in laravel.Checking the laravel docs, i saw that using the method Paginator like :`</p>
  
  <p>$applicants = Paginator::make($applicants,$totalApplicants,4);`</p>
  
  <p>But when i return $applicants it gives me all the records and not the 4 as requested in my Paginator::make method but if i call the links() mehod on my applicants like : $applicants->links() it returns the link to the pagination to my view</p>
  
  <p>Please what am i doing wrong or do i need to write a mehod to make this work  </p>
  
  <p>Code from My Controller:</p>
  
  <pre><code>$statement3 = "SELECT * FROM applicant where lga = '$appulga' ";
  
          //loop through lga id to build query
          foreach($LGA_Names as $lga)
          {
              $statement3.= " "."OR"." "."lga=". "'".$lga."'";
          }
  
          //FAcility for User assigned LGA
          $applicants = DB::Select($statement3);
          ///////////////////////////////////////////////////////////////
          $totalApplicants = count($applicants);
          $perpage = 4;
  
          $applicants = Paginator::make($applicants,$totalApplicants,$perpage);
  </code></pre>