Jump to content

guidance on multiple auths laravel 5


Danny620

Recommended Posts

Hi all,

 

I’m building a search engine to find courses online; I wanted to ask for some guidance with the best way to program/structure the project. I’m going to be building the application using laravel 5.2

 

I have 3 different types of users as follows

 

Users

Course Providers

Advisors

 

All of which have different information associated with them such as

 

Users Table

first_name

last_name

date_of_birth

email

password

 

Course Providers – this needs to have multiple logins associated with the course provider

company_name

address_line_1

address_line_2

postcode

tel

 

Advisors

company_name

first_name

last_name

email

password

 

I still want to use laravels Auth but how can I allow multiple auths or am I best in using roles if so how would this work?

 

What’s the best way of handling multiple logins that are associated with 1 company?

 

I would appreciate if anyone can give me a better solution or point me in the right direction.

Link to comment
Share on other sites

This isn't really the proper section for this post, so people are likely to pass it by.  

 

There's not enough info there to offer much help with design I'm afraid.  We would need to know more about the context of the project.  Can users be course providers and / or advisors and / or something other than either of these? Is it possible for a course provider to also be an advisor?  can an advisor be associated with multiple course providers and / or vice versa? Can a user belong to multiple course providers and / or advisors? etc.

 

If you can give us an accurate brief we will help where we can.

Link to comment
Share on other sites

Ive been thinking of creating one table to hold the login details

 

like Auth

 

id, email, password, user_id, provider_id, advisor_id

 

Then link to auth to like users table where it can hold there details such as first_name, last_name

 

What do you think? Has anyone seen this implemented before?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.