Hello. Whole day I try to filter by categories in pagination. I read all of google' topics and nothing. So anybody can help me ?
I'am new and I learn what I see in web (btw),so I want to display posts with a specific category, which can be may. I have select with multiple options:
cat1
cat2
after submit in get I have: myweb.app/x?category=cat1&category=cat2#
eg. I selected cat1 and cat2, after submit I want all posts from these categories
How to do that ?
Thank u! Whole day and it works! when I used array in html next I used this: $posts = Post::whereIn('category', request()->get('category')), but do you know how to get rid of the "bushes" in url ? %5B%5D = [] ?