Merge branch 'master' of github.com:stancl/tenancy-docs

This commit is contained in:
Samuel Štancl 2019-10-10 20:12:48 +02:00
commit 54680c094d
8 changed files with 360 additions and 300 deletions

View file

@ -30,7 +30,7 @@ Available storage drivers:
#### redis {#redis-db-driver}
- `connection` - what Redis connection should be used to store tenant data
- `connection` - what Redis connection should be used to store tenant data. See the [Storage Drivers]({{ $page->link('storage-drivers') }}) documentation.
### `tenant_route_namespace` {#tenant-route-namespace}
@ -48,7 +48,7 @@ You can set the suffix to `.sqlite` if you're using sqlite and want the files to
### `redis` {#redis}
If `tenancy.redis.tenancy` is set to true, connections listed in `tenancy.redis.prefixed_connections` will be prefixed with `config('tenancy.redis.prefix_base') . $id`.
If the `RedisTenancyBootstrapper` is enabled (see `bootstrappers` below), any connections listed in `tenancy.redis.prefixed_connections` will be prefixed with `config('tenancy.redis.prefix_base') . $id`.
> Note: You need phpredis. Predis support will dropped by Laravel in version 7.

View file

@ -13,7 +13,7 @@ Jobs are automatically multi-tenant, which means that if a job is dispatched whi
Open `config/queue.php` and make sure your queue driver has an explicitly set connection. Otherwise it would use the default one, which would cause issues, since `database.default` is changed by the package and Redis connections are prefixed.
**If you're using `database`, add a new line to `queue.connections.database`:**
**If you're using `database`, add a new line to `queue.connections.database` and `queue.failed`:**
```php
'connection' => 'mysql',
```
@ -22,4 +22,4 @@ where `'mysql'` is the name of your non-tenant database connection with a `jobs`
Also make sure you run the queue migrations **for the central database**, not your tenants.
**If you're using Redis, make sure its `'connection'` is not in `tenancy.redis.prefixed_connections`.**
**If you're using Redis, make sure its `'connection'` is not in `tenancy.redis.prefixed_connections`.**

View file

@ -47,7 +47,7 @@ Read the [Redis documentation page on persistence](https://redis.io/topics/persi
If your cache driver is Redis and you don't want to use AOF with it, run two Redis instances. Otherwise, just make sure you use a different database (number) for tenancy and another for anything else.
To use this driver, create a new Redis connection in the `database.redis` configuration (`config/database.php`) called `tenancy`.
To use this driver, create a new Redis connection in the `database.redis` configuration (`config/database.php`) called `tenancy` (or if you use another name, be sure to update it in the `tenancy.storage_drivers.redis.connection` configuration (`config/tenancy.php`)).
```php
'tenancy' => [

View file

@ -52,5 +52,5 @@ If you're coming from 1.x, it's recommended to read (or at least skim through) t
## New Features
- [Tenant Config]({{ $page->link('tenant-config') }})
- [Migrate Fresh]({{ $page->link('commands#migrate-fresh') }})
- [`tenants:create`]({{ $page->link('commands#create-tenant') }})
- [Migrate Fresh]({{ $page->link('console-commands#migrate-fresh') }})
- [`tenants:create`]({{ $page->link('console-commands#create-tenant') }})