Skip to content
Discussion options

You must be logged in to vote

Since you have "roles" (plural) and also you want to add a select_multiple field I would suggest that you make users table with name, email, password, etc. and a roles table with name and anything else the role itself needs. Then create a connecting table (pivot table) following this guide: https://laravel.com/docs/10.x/eloquent-relationships#many-to-many it even has an example with users and roles :) Do not forget that you should create the database structure properly and also define the proper relationship between the user and the role models - the first two sections in the link I sent - "Table Structure" and "Model Structure".

Then once you have this, you can use the select_mutiple col…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tabacitu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants