Fix a few things in docs

This commit is contained in:
Samuel Štancl 2020-06-13 11:52:10 +02:00
parent 42e2c51343
commit 072eb36494
11 changed files with 49 additions and 17 deletions

View file

@ -8,6 +8,8 @@ section: content
If you'd like to share certain resources, usually users, between tenant databases, you can use our resource syncing feature. This will let you **sync specific columns between specific tenant databases and the central database.**
This is a relatively complex feature, so before implementing it, make sure you really need it. You only need this feature if you're using multi-database tenancy and need to sync specific resources (like users) between different tenants' databases.
## Database
The resource exists in the central database, for example a `users` table. Another table exists in the tenants' databases. It can use the same name as the central database or a different name — up to you.
@ -172,7 +174,7 @@ Here's how it will work:
tenancy()->initialize($tenant);
// Create the same user in tenant DB
$user = TenantUser::create([
$user = User::create([
'global_id' => 'acme',
'name' => 'John Doe',
'email' => 'john@localhost',