Hello Guys ! I develop eCommerce platform but i don't know how to implement the scenario below. I want to have friendly URLs (for SEO stuff..). I have the correct slug in the database for categories and products for example:
wwww.domain.com/category-laptops/ - which are categories
but i and products which are:
How to implement this logic in to the handler below ? How to know when it is product or category ? Do i need to make two separate queries (one for products and one for categories) to the database ?