Migrate Users with roles from Old System to Laraship

Laraship QuestionsCategory: TechnicalMigrate Users with roles from Old System to Laraship
Simon Beaupre asked 6 years ago
Hi, I'm trying to bind users from my app to Laraship user. But I'm not able to find where you bind user to their role. This is the user data I need for my app: ID,Name,Surname,RegisterDate, Role,SessionToken Most of those are already in the user table and for those who are not I can add them, but I'm not able to find where you put the role column. I found the Roles table but there is nothing to reference user, its used only to manage roles. The user need to be able to register from the app then be able to connect in the website to subscribe or manage the service. How do you tell a user is what role? And can I add it to user table ? Thanks.
1 Answers
laraship Staff answered 6 years ago

Hello.

There is a morph table called model_has_roles that connects the users with roles, check the attached screenshot

Attachments