I have an application where I need to filter further the paginated results. When I apply filter method after the pagination method the view gives an error.
I can't insert the logic in sql query because it is complex enough.
How can I paginate and filter the results and pass to view so that pagination also works from there?
I tried that. But I get error - 'paginate' does not exist. I think it is because after filtering we get a collection and paginate does not exist on collection.
I have a little complex condition. When I do it by chaining where method on eloquent I get not a number and various other errors.
Can you guide me how should I do this operation please?