In this episode, we're circling back to our forum filters now that we've added the concept of solutions to discussions. The main goal here is to make it super simple for users to find which discussions are already solved—and, just as important, which ones still need some help. This can inspire people to jump in and contribute where their help is needed the most.
We kick things off by building a solved discussions filter, using a pretty basic query: if a discussion has a non-null solution post ID, it means someone has already solved it. We update our navigation and controllers so anyone—logged in or not—can access this filter easily.
Next, we add the unsolved discussions filter, which is just the opposite: it checks for a null solution post ID, meaning nobody's come up with an answer yet. This gets wired up the same way in our navigation and controllers.
By the end of the episode, we've got two new handy filters—solved and unsolved—that make it much easier for users to browse discussions by their solution status. Super straightforward, but really useful for any forum!