paginate () method with errors

Posted 6 months ago by daniel21gt

I have detected that laravel when sent a numerical page parameter works perfect, for example.

$users = User::where('votes', '>', 100)->paginate(15);

but if you are in via a parameter by means of a request

$numero = $request->numero;

$users = User::where('votes', '>', $numero)->paginate(15);

dd ($ number) would be 100, but in this way it only loads the first page and the following ones do not, maybe the paginate () method can not manage past values with request?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.