UsmanFarzand's avatar

DB::Select query with pagination ?

$users = DB::select('SELECT s.id,s.name,s.email,p.profile_for,p.date_of_birth,p.fname,p.lname,
        p.religion,p.marital_status,p.professional,p.salary,p.father_occupation,
        p.mother_occupation,p.sister,p.brother,p.address,p.address2,p.city,p.state,p.country,
        p.phone_number,p.education,p.caste,p.body,p.waist,p.height,p.weight,
        p.image,p.image_path,p.age,p.about_me,p.gender
         FROM users s, user_profiles p 
         where p.user_id = s.id
         and (p.gender = "Male"
         or p.gender = "MALE"
         or p.gender = "male")')->paginate(2);

my code with paginate is not working.......

0 likes
3 replies

Please or to participate in this conversation.