mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 11:34:03 +00:00
Queue bootstrapper use tenancy() state
This commit is contained in:
parent
057ddcbbae
commit
34d3189d61
1 changed files with 5 additions and 7 deletions
|
|
@ -15,8 +15,6 @@ use Stancl\Tenancy\Contracts\Tenant;
|
|||
|
||||
class QueueTenancyBootstrapper implements TenancyBootstrapper
|
||||
{
|
||||
public $tenancyInitialized = false;
|
||||
|
||||
/** @var Repository */
|
||||
protected $config;
|
||||
|
||||
|
|
@ -75,17 +73,17 @@ class QueueTenancyBootstrapper implements TenancyBootstrapper
|
|||
|
||||
public function bootstrap(Tenant $tenant)
|
||||
{
|
||||
$this->tenancyInitialized = true;
|
||||
//
|
||||
}
|
||||
|
||||
public function revert()
|
||||
{
|
||||
$this->tenancyInitialized = false;
|
||||
//
|
||||
}
|
||||
|
||||
public function getPayload(string $connection)
|
||||
{
|
||||
if (! $this->tenancyInitialized) {
|
||||
if (! tenancy()->initialized) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue