I'm doing some experimenting with CakePHP and I came across the following:
Take users, each user is in a specific state (f.e. inactive, banned, new, ...). Each user has only one of these states.
Now apart from this state all users are part of the same Model (Users). So their visual representation in a template with a html table is exactly the same.
What I want to do now is putting all the users in the same state in the same table. Having a different table for each state.
It looks silly to go around and repeating the same template code for each set of users.
What's the proper way to handle this in CakePHP 3?