mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 20:14:04 +00:00
Add TenantDoesNotExist exception, fix queued migrator serialization
This commit is contained in:
parent
e98db460ec
commit
2f3924531d
5 changed files with 41 additions and 6 deletions
|
|
@ -16,12 +16,12 @@ class QueuedTenantDatabaseMigrator implements ShouldQueue
|
|||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/** @var Tenant */
|
||||
protected $tenant;
|
||||
/** @var string */
|
||||
protected $tenantId;
|
||||
|
||||
public function __construct(Tenant $tenant)
|
||||
{
|
||||
$this->tenant = $tenant;
|
||||
$this->tenantId = $tenant->id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -32,7 +32,7 @@ class QueuedTenantDatabaseMigrator implements ShouldQueue
|
|||
public function handle()
|
||||
{
|
||||
Artisan::call('tenants:migrate', [
|
||||
'--tenants' => [$this->tenant->id],
|
||||
'--tenants' => [$this->tenantId],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue