Support the ongoing development of Laravel.io →
Requests Input
Last updated 2 years ago.
0

As far I understand you, you want to add parameters to your pagination. How do they look like? I can't imagine a usecase where you need so many parameters.

Could you pls post an example of your request uri?

If you really have such a request you should overthink your usecase. The $_GET params should only be used for a "few" params. If you want more use $_POST, but then you need to modify the default pagination.

0

My data looks like this

380673113513 380673113514 380673113515 380673113516 ... and a few thousand more

I break them into an array $numberList = explode("\r\n", $request['inputList']);

And I make a selection with pagination $objects = Number::has('object')->with('object')->whereIn('number', $numberList)->Paginate(1000);

To work pagination, I retransmit the data of my form {{ $objects->appends(['inputList' => $_REQUEST['inputList']])->links() }}

As a result I have such links http://telbase.dev/list?inputList=380673113513%0D%0A380673113514%0D%0A380673113515%0D%0A380673113516%0D%0A380673113517%0D%0A380673113518%0D%0A380673113519%0D%0A380673113520%0D%0A380673113521%0D%0A380673113522%0D%0A380673113523%0D%0A380673113524%0D%0A380673113525%0D%0A380673113526%0D%0A380673113527%0D%0A380673113528%0D%0A380673113529%0D%0A380673113530%0D%0.................&page=2

If there is a lot of data, the string is very long and the server returns an error 414 Request URI Too Large

Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ant1fr1z ant1fr1z Joined 13 Jun 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.