Hi! I have made model connections (many to many) and I can easily get the tags by article
Tables:
articles (id, name)
tags (id, name)
articlestags (article_id, tag_id)
categories (id, name)
articlescategories (article_id, category_id)
- How to get articles by tag_id and category_id (the orm way)? for example get articles with tag_id = 1 and category_id = 2
- How to get articles with multiple tags and categories? for example get articles that have tag_id = 1, tag_id = 2, category_id = 3, category_id = 4