Danny620 Posted January 11, 2016 Share Posted January 11, 2016 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. Quote Link to comment Share on other sites More sharing options...
Danny620 Posted January 12, 2016 Author Share Posted January 12, 2016 anyone? Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted January 12, 2016 Share Posted January 12, 2016 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. Quote Link to comment Share on other sites More sharing options...
Danny620 Posted January 12, 2016 Author Share Posted January 12, 2016 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? Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted January 12, 2016 Share Posted January 12, 2016 I would advise against that, there is no need to fragment the data across tables in this instance. Each login is (or at the very least should) only be for a single person, so it makes more sense to have the information about that individual in the same table. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.