1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 19:04:02 +00:00

refactor TenantDatabaseManagers

This commit is contained in:
Samuel Štancl 2022-08-27 22:29:08 +02:00
parent 824292e6df
commit d2e1ce0a1e
10 changed files with 52 additions and 126 deletions

View file

@ -12,14 +12,17 @@ use Stancl\Tenancy\Database\Contracts\TenantWithDatabase as Tenant;
class DatabaseConfig
{
// todo docblocks
/** The tenant whose database we're dealing with. */
public Tenant&Model $tenant;
public static Closure $usernameGenerator;
/** Database username generator (can be set by the developer.) */
public static Closure|null $usernameGenerator = null;
public static Closure $passwordGenerator;
/** Database password generator (can be set by the developer.) */
public static Closure|null $passwordGenerator = null;
public static Closure $databaseNameGenerator;
/** Database name generator (can be set by the developer.) */
public static Closure|null $databaseNameGenerator = null;
public static function __constructStatic(): void
{