1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 10:14:04 +00:00
This commit is contained in:
Samuel Štancl 2019-02-26 21:38:15 +01:00
parent 2f37b598d7
commit e46af3676f
2 changed files with 2 additions and 2 deletions

View file

@ -25,8 +25,6 @@ composer require stancl/tenancy
This package follows [semantic versioning 2.0.0](https://semver.org). Each major release will have its own branch, so that bug fixes can be provided for older versions as well. This package follows [semantic versioning 2.0.0](https://semver.org). Each major release will have its own branch, so that bug fixes can be provided for older versions as well.
Supported versions of Laravel are 5.7 and 5.8.
### Configuring the `InitializeTenancy` middleware ### Configuring the `InitializeTenancy` middleware
The `TenancyServiceProvider` automatically adds the `tenancy` middleware group which can be assigned to routes. You only need to make sure the middleware is top priority. The `TenancyServiceProvider` automatically adds the `tenancy` middleware group which can be assigned to routes. You only need to make sure the middleware is top priority.

View file

@ -49,6 +49,8 @@ class Migrate extends MigrateCommand
$this->input->setOption('database', 'tenant'); $this->input->setOption('database', 'tenant');
dd($this->option('tenants'));
tenant()->all($this->option('tenants'))->each(function ($tenant) { tenant()->all($this->option('tenants'))->each(function ($tenant) {
$this->line("Tenant: {$tenant['uuid']} ({$tenant['domain']})"); $this->line("Tenant: {$tenant['uuid']} ({$tenant['domain']})");
$this->database->connectToTenant($tenant); $this->database->connectToTenant($tenant);