In this episode, we're making progress on our team management features by displaying a list of team members. We start by adjusting our permissions to make sure both admins and regular team members have the 'view team members' ability. This sets things up so everyone on the team can see who else is in the team.
Next, we dive into Blade: we create a new partial specifically for listing members, and scaffold out a basic layout. To keep things clean (and reusable for when we start adding more member actions), we set up a Blade component for individual team members—right now, it just displays their name and email.
We hook up the relationship in our Team model to link users with teams, then test this out by adding a couple more users manually for now (since invite functionality isn't ready yet). With that, we can actually see multiple users pop up in our new members list.
To make sure everything is working solid, we write a quick feature test to check that member info shows up correctly on the page. We use some handy assertions to confirm all member names and emails are visible, and after fixing a small issue, the test passes.
By the end of the episode, we've got the foundation for a dynamic members list. It's simple for now, but we've structured things so it's easy to add new features—like changing roles or removing members—in upcoming episodes.