replace ->tenant access with ->getTenant() calls

This commit is contained in:
Samuel Štancl 2020-01-28 17:03:25 +01:00 committed by GitHub
parent 22324ec158
commit 6cb9deb08e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,8 +19,8 @@ Tenant::new()->withData([
// Make tweaks to the connection before bootstrapping tenancy // Make tweaks to the connection before bootstrapping tenancy
tenancy()->hook('bootstrapping', function ($tenantManager) { tenancy()->hook('bootstrapping', function ($tenantManager) {
config(['database.connections.someTenantConnectionTemplate.name' => $tenantManager->tenant['database_name']]); config(['database.connections.someTenantConnectionTemplate.name' => $tenantManager->getTenant('database_name')]);
config(['database.connections.someTenantConnectionTemplate.password' => $tenantManager->tenant['database_password']]); config(['database.connections.someTenantConnectionTemplate.password' => $tenantManager->getTenant('database_password')]);
config(['database.connections.someTenantConnectionTemplate.host' => $tenantManager->tenant['database_host']]); config(['database.connections.someTenantConnectionTemplate.host' => $tenantManager->getTenant('database_host')]);
}); });
``` ```