mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 20:54:04 +00:00
18 lines
416 B
PHP
18 lines
416 B
PHP
<?php
|
|
|
|
namespace Stancl\Tenancy\Listeners;
|
|
|
|
use Stancl\Tenancy\Events\RevertedToCentralContext;
|
|
use Stancl\Tenancy\Events\TenancyEnded;
|
|
|
|
class RevertToCentralContext
|
|
{
|
|
public function handle(TenancyEnded $event)
|
|
{
|
|
foreach ($event->tenancy->getBootstrappers() as $bootstrapper) {
|
|
$bootstrapper->revert();
|
|
}
|
|
|
|
event(new RevertedToCentralContext($event->tenancy));
|
|
}
|
|
}
|