mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 18:04:03 +00:00
BroadcastingConfigBootstrapper: make Broadcaster::class resolve to tenant's broadcaster on bootstrap()
This commit is contained in:
parent
c653c51928
commit
b1e91f1029
1 changed files with 5 additions and 0 deletions
|
|
@ -76,6 +76,11 @@ class BroadcastingConfigBootstrapper implements TenancyBootstrapper
|
|||
|
||||
return $tenantBroadcastManager;
|
||||
});
|
||||
|
||||
// Make the Broadcaster singleton resolve to the broadcaster of the TenantBroadcastManager so that it uses the tenant credentials
|
||||
$this->app->extend(Broadcaster::class, function (Broadcaster $broadcaster) {
|
||||
return $this->app->make(BroadcastManager::class)->connection();
|
||||
});
|
||||
}
|
||||
|
||||
public function revert(): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue