@kapitan You need to give each paginator instance a different “page name”. You can set it using the third parameter of paginate(): https://github.com/laravel/framework/blob/5.6/src/Illuminate/Database/Eloquent/Builder.php#L704
Jun 28, 2018
4
Level 1
Custom Pagination Name Using Repository Pattern
I have something like these:
$order_blue = $this->orderRepository->findWhere(['color' => 'blue'])->paginate(5);
$order_red = $this->orderRepository->findWhere(['color' => 'red'])->paginate(5);
then i need to display them on the same window / blade on a separate html tables.
my problem is, if I'll click the page 3, the other table also respond.
my second question is, the two tables on display has a search box each, how can i construct the code on my controller to respond on the search boxes individually.
thank you very much in advance!
Please or to participate in this conversation.