document more features

This commit is contained in:
Samuel Štancl 2019-11-10 15:09:01 +01:00
parent 34a6b2cadd
commit be8d1fa497
2 changed files with 15 additions and 2 deletions

View file

@ -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`: