So I have a really basic query, and for some reason it keeps telling me that no response data has been sent.
Here's my function:
{
$search = Input::get('search', null);
$takeList = array(25, 50, 100);
$take = Input::get('take', $takeList[0]);
$users = User::orderBy('display_name', 'asc');
if(!empty($search)) {
$users = $users->where(function($q) use($search) {
$q->where('email', 'LIKE', "%$search%");
$q->orWhere('display_name', 'LIKE', "%$search%");
$q->orWhere('first_name', 'LIKE', "%$search%");
$q->orWhere('last_name', 'LIKE', "%$search%");
});
}
$users = $users->paginate($take);
return View::make('backend.users.home',[
'users' => $users,
'takeList' => $takeList,
]);
}
I keep getting `MY_IP didn’t send any data."
I have tried using skip
and take
instead of pagination. Which take and skip gets the users (I know because I use print_r to see), but does not with pagination. I looked in my laravel.log and it tells me it exceeds the maximum memory.
Doesn't make sense because it's getting 25 users, and they only have a username, email, display name and an ID. I can't see that taking up much memory.
Found my problem.
I had imported a user list, and the date fields were null, and the pages that didn't work tried use that date.
Silly me.