mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:34:04 +00:00
Use a nicer way to bind the current tenant
This commit is contained in:
parent
27425a4360
commit
6b716e5345
6 changed files with 62 additions and 38 deletions
|
|
@ -103,6 +103,9 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
$app, $app[StorageDriver::class], $app[DatabaseManager::class], $app[$app['config']['tenancy.unique_id_generator']] // todo
|
||||
);
|
||||
});
|
||||
$this->app->bind(Tenant::class, function ($app) {
|
||||
return $app[TenantManager::class]->currentTenant();
|
||||
});
|
||||
|
||||
// todo foreach bootstrappers, singleton
|
||||
foreach ($this->app['config']['tenancy.bootstrappers'] as $bootstrapper) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue