@jinsonjose if you use eloquent and have a relationship with your User hasMany UserProfile set up then you can with
$user = User::where('users.type', 'member')->with('userProfiles')->whereHas(
'userProfiles', function ($query) {
$query->where('profile_status', 'approved');
}
)->select('users.name', 'users.email',
'users.location', 'users.type', 'users.ip', 'users.last_login', 'users.created_at', 'users.id',
'user_profiles.profile_status')->skip(($page - 1) * $this->perPage)->limit($this->perPage)->get();
not sure what
when operating with 10 lakhs data
means though. Can you explain?