How to build a route to filter the posts?

Good time of day.

My question is about routing. What should be the route filtering of posts under categories and under books ?

Examples of my ideas:

1) /posts/categoryName
2) /categoryname/

How to implement it correctly ?

Thanks in advance!
June 5th 19 at 21:32

Find more questions by tags Web Development