Closed xyrintech closed 7 years ago
In order to create a tenant you need to create a new instance and then save:
$tenant = new \DanTheDJ\MultiTenant\Tenant();
$tenant->name = 'ACME Inc.';
$tenant->email = 'person@acmeinc.com';
$tenant->subdomain = 'acme';
$tenant->alias_domain = 'acmeinc.com';
$tenant->connection = 'tenant_db';
$tenant->meta = ['phone' => '123-123-1234'];
$tenant->save();
Maybe place this in your register script.
How can we create a database for every tenant when we register.