I suggest you to add a column in the user table to indicate whether the user is employee or not like is_employee, and then do you permission according to that.
May 12, 2022
5
Level 10
Structuring of users (auth) with multiple types
I have 2 types of users in my project:
- employees
- students
Employees will have a lot more information associated and relations than students, I want these relations to be mandatory, but for students they are not there. My initial thought is to create 2 tables, but how do I manage authentication from 2 different tables?
Please or to participate in this conversation.