1
1
101010102019-08-14 19:52:00
Laravel
10101010, 2019-08-14 19:52:00

How to make separate registration in Laravel on subdomains with a common software core and a single database?

Hello!
Tell me how to make an application with several domains / subdomains and so that each of the subdomains can be registered with the same e-mail address.
And during authentication, if the user is in the database, but was registered on another subdomain, so that he would not be allowed into the system. Simply put: separate registration for subdomains.
Tell me what plugins to read .. or personal experience, if you have implemented this.
Most of the questions are about how to organize the database so as not to produce unnecessary loads on it ... it’s true that my head still explodes a little, because some of the content: posts should be shared .. imagine Reddit or Peekaboo where posts from the main site fly to child, but each subsite has its own comments and ratings, comments from other subsites are not visible. Plus there is an opportunity to write your posts from local users.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
ThunderCat, 2019-08-14
@ThunderCat

Display domains in a separate table id | domen_name
When registering in a user record, enter the domen_id field.
The same applies to all resources - posts, etc., if you need to select ALL posts - the domain membership field is ignored, or it is considered from the list of allowed, described in a separate table.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question