Filter query unless filter param is null
My goal is to filter the query results to only get posts (think any social media) with a specific tag. The tag is getting send as a search param in the url, and I can filter properly when there is a search param to filter, but I want to ignore the filter if it's null.
Essentially, how can I void the
Essentially, how can I void the
.eq("tag", null) when the match case is null, that way I get all posts instead of none.