1

I'm trying to wrap my head around the best approach to this problem, I'm making a web-app that is to have two types of users. - Administrator (administrators_table) - User (users_table)

The User has many many more properties than an Administrator which is relatively straight-forward. So we've separated them to different tables.

Ideally, I'd like them to use the same login form. Would my current scenario of two separate tables be recommended, or is there a better approach to this?

2
  • A further thought, would it be ideal to make the users part of the same database table, and separate the 'User details' stuff to a linked table? Commented Feb 20, 2018 at 3:15
  • You need to try multiple authentications: stackoverflow.com/a/35772716/5503275 Commented Feb 20, 2018 at 4:21

1 Answer 1

1

Thank you to everyone's input. Although very good, it was a bit complex for this simple app.

We decided to merge the Admin and Users table, and have an isAdmin column and using Laravel's Middleware to separate the two roles.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.