I think the most easy thing to do is just make a pivot table, with a user_id, competition_id and a role and then you can do something like 1 is participant and 2 is a judge. Now for the data integrity, you can use something like SQL Triggers to prevent multiple rows from the same user for the same competition. But you can also just do that in Laravel which is much easier. So if you are adding a new entry to the pivot table, just check if there is already a row with that user and competition, and if so return false.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community