I wanted to ask you the following question:
It turns out that I have a few tables that require a "many to many" relation (eg, users and roles, assuming primary key for both as 'id').
The issue is that I have the doubt as a "best practice" (using laravel) if I create the pivot table role_user with composite primary key (role_id and user_id) or create the column 'id' accompanied by the foreign keys " role_id and user_id ").
I understand that the second option could generate problems with the coherence of the data (being able to generate repeated combinations), but I evaluate that option considering that laravel does not let me handle the composite keys very well.
What would be a good practice for this case and the like? .
Beforehand, thank you very much!