Update tenants.blade.md

This commit is contained in:
Samuel Štancl 2022-09-28 14:34:06 +02:00 committed by GitHub
parent 07584b88f7
commit ddff134223
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -137,10 +137,10 @@ When your code executes in the context of a tenant, you may access the central a
For instance, if you want to retrieve the list of users of the central application when the code executes in a tenant's context, you may write:
```php
// here we are in the tenant's context. \App\Models\User::all() would return the current tenant's users.
// Here we are in the tenant's context. User::all() would return the current tenant's users
$centralUsers = tenancy()->central(function () {
// here we are in the central app context
return \App\Models\User::all();
// Here we are in the central context
return User::all();
});
```