How to create separate model for each user type in Laravel
I have the basic User model that deals with the users table, I have two
types of users, each type has different attributes and reads those
attributes form a different database.
User: name, email, type (x,y)
type_x: gender, age
type_y: color, location
So I have the user table, the type_x table, and the type_y table.
How can I create three different models, User, Typex, and Typey so that I
can retrieve the data of each model in a different way and dealing with a
different table?
No comments:
Post a Comment