mirror of
https://github.com/archtechx/tenancy.git
synced 2026-08-06 05:54:03 +00:00
Update src/Bootstrappers/BroadcastingConfigBootstrapper.php
Use `instance` instead of `singleton` in `revert()` (they're pretty much equivalent) Co-authored-by: Samuel Stancl <samuel@archte.ch>
This commit is contained in:
parent
31d1663347
commit
d535b28d67
1 changed files with 2 additions and 2 deletions
|
|
@ -122,8 +122,8 @@ class BroadcastingConfigBootstrapper implements TenancyBootstrapper
|
||||||
public function revert(): void
|
public function revert(): void
|
||||||
{
|
{
|
||||||
// Revert the bound BroadcastManager and Broadcaster singletons back to their original state
|
// Revert the bound BroadcastManager and Broadcaster singletons back to their original state
|
||||||
$this->app->singleton(BroadcastManager::class, fn () => $this->originalBroadcastManager);
|
$this->app->instance(BroadcastManager::class, $this->originalBroadcastManager);
|
||||||
$this->app->singleton(BroadcasterContract::class, fn () => $this->originalBroadcaster);
|
$this->app->instance(BroadcasterContract::class, $this->originalBroadcaster);
|
||||||
|
|
||||||
// Clear the resolved Broadcast facade instance so that it gets re-resolved as the central BroadcastManager
|
// Clear the resolved Broadcast facade instance so that it gets re-resolved as the central BroadcastManager
|
||||||
Broadcast::clearResolvedInstance();
|
Broadcast::clearResolvedInstance();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue