Skip to content
Discussion options

You must be logged in to vote

If you have a fixed amount of roles (lets say 3 in your case), create models for each role (admin, designer, staff) which includes specific data for each role
For every role, assign its related relationship (design, staffImage, etc.)

In your controllers:
Check for the role of user (admin, designer, staff) and then fetch its role-model instance and then fetch the related data to the role

Example:
User (Staff) -> StaffProfile -> StaffImage

User (Designer) -> DesignerProfile -> Design

If this is too much abstraction, you could just assign all relationships to the user model and only query each when needed.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@remidosol
Comment options

Comment options

You must be logged in to vote
2 replies
@fairhat
Comment options

@remidosol
Comment options

Answer selected by remidosol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants