Take action once the tenant has been created.
mohammed-kabbani opened this issue · 1 comments
mohammed-kabbani commented
Greetings,
Upon successfully generating a tenant and model using the following code:
$tenant = Tenant::create(['id' => $tenantName]);
$tenant->domains()->create(['domain' => $tenantDomain]);
I aim to implement an Observer for further actions. For instance, once this tenant is created, the subsequent operations will be executed:
$client = new ClientRepository();
$client->createPasswordGrantClient(null, 'Default password grant client', 'http://localhost');
$client->createPersonalAccessClient(null, 'Default personal access client', 'http://localhost');
also, other tasks like setting up a default/demo user can also be performed at this stage.
*note: when I do that with an observer or directly on the tenant tables, nothing happens
stancl commented
Not a docs issue, use the right support channels such as our Discord.