mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 18:24:03 +00:00
document more features
This commit is contained in:
parent
34a6b2cadd
commit
be8d1fa497
2 changed files with 15 additions and 2 deletions
|
|
@ -28,7 +28,6 @@ To call methods on `TenantManager`, you may use the `tenancy()` helper or the `T
|
|||
|
||||
### Find tenant by domain
|
||||
|
||||
|
||||
```php
|
||||
>>> tenancy()->findByDomain('bar.localhost')
|
||||
=> Stancl\Tenancy\Tenant {#3091
|
||||
|
|
@ -41,6 +40,14 @@ To call methods on `TenantManager`, you may use the `tenancy()` helper or the `T
|
|||
}
|
||||
```
|
||||
|
||||
### Find tenant by arbitrary key
|
||||
|
||||
> Note: Only the DB storage driver implements this feature.
|
||||
```php
|
||||
tenancy()->findBy('email', $email);
|
||||
tenancy()->findByEmail($email);
|
||||
```
|
||||
|
||||
### Getting the current tenant
|
||||
|
||||
One more way to get the current [tenant]({{ $page->link('tenants') }}) is to call `getTenant()` on `TenantManager`:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue