Short advice.Add column to users-subdomain(string). Get subdomain from Request facade/object (maybe use regexp). Override Auth controller, add there where('subdomain,'=',... .But it means every table must have subdomain column. Or column with subdomain_id. Middleware somehow can help you maybe also. You can make Helper which gives you subdomain and use it in Models with where() function => simplest method.
Aug 6, 2017
2
Level 1
Multiple authentication across subdomains
I'm creating an ecommerce platform where users can make their own shops and get a subdomain. Laravel can handle authentication but how will I go about handling authentication in different sub domains? So each subdomain has its own session and there's one table of users for all stores globally.
Please or to participate in this conversation.