class DatabaseConfig (View source)

Properties

TenantWithDatabase|Model $tenant
static callable $usernameGenerator
static callable $passwordGenerator
static callable $databaseNameGenerator

Methods

static void
__constructStatic()

No description

__construct(TenantWithDatabase $tenant)

No description

static void
generateDatabaseNamesUsing(callable $databaseNameGenerator)

No description

static void
generateUsernamesUsing(callable $usernameGenerator)

No description

static void
generatePasswordsUsing(callable $passwordGenerator)

No description

string|null
getName()

No description

string|null
getUsername()

No description

string|null
getPassword()

No description

void
makeCredentials()

Generate DB name, username & password and write them to the tenant model.

string
getTemplateConnectionName()

No description

array
connection()

Tenant's own database connection config.

array
tenantConfig()

Additional config for the database connection, specific to this tenant.

manager()

Get the TenantDatabaseManager for this tenant's connection.

Details

static void __constructStatic()

No description

Return Value

void

__construct(TenantWithDatabase $tenant)

No description

Parameters

TenantWithDatabase $tenant

static void generateDatabaseNamesUsing(callable $databaseNameGenerator)

No description

Parameters

callable $databaseNameGenerator

Return Value

void

static void generateUsernamesUsing(callable $usernameGenerator)

No description

Parameters

callable $usernameGenerator

Return Value

void

static void generatePasswordsUsing(callable $passwordGenerator)

No description

Parameters

callable $passwordGenerator

Return Value

void

string|null getName()

No description

Return Value

string|null

string|null getUsername()

No description

Return Value

string|null

string|null getPassword()

No description

Return Value

string|null

void makeCredentials()

Generate DB name, username & password and write them to the tenant model.

Return Value

void

string getTemplateConnectionName()

No description

Return Value

string

array connection()

Tenant's own database connection config.

Return Value

array

array tenantConfig()

Additional config for the database connection, specific to this tenant.

Return Value

array

TenantDatabaseManager manager()

Get the TenantDatabaseManager for this tenant's connection.

Return Value

TenantDatabaseManager