I have two models:
one for products
the other one is for collections (collection of products)
I want to make a search on both of them
after the search completes, I concatenate the result to a single variable called items to be displayed in the view by foreach statement
I have a problem with pagination as it's not supported for laravel collections
I'm using livewire component
One of the ways to solve this is to transform the results into identical structure and merge into one collection, from there you can call pagination methods on it.
@PovilasKorop
Firstly thank you for your reply to my question
and thank you for your amazing series "laravel daily", I'm a big fan of it.
I tried this way but I got an error when I used ->paginate() because it's not present as a method in laravel collection