mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 05:44:04 +00:00
Use seeder params in tenants:seed instead of just the automatic seeder (#317)
* Use seeder params in tenants:seed instead of just the automatic seeder * Left trim - from option names * Use no seeder params for tests
This commit is contained in:
parent
776af4643c
commit
526f0826a4
5 changed files with 10 additions and 9 deletions
|
|
@ -19,13 +19,9 @@ class QueuedTenantDatabaseSeeder implements ShouldQueue
|
|||
/** @var string */
|
||||
protected $tenantId;
|
||||
|
||||
/** @var array */
|
||||
protected $seederParameters = [];
|
||||
|
||||
public function __construct(Tenant $tenant, $seederParameters = [])
|
||||
public function __construct(Tenant $tenant)
|
||||
{
|
||||
$this->tenantId = $tenant->id;
|
||||
$this->seederParameters = $seederParameters;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -37,6 +33,6 @@ class QueuedTenantDatabaseSeeder implements ShouldQueue
|
|||
{
|
||||
Artisan::call('tenants:seed', [
|
||||
'--tenants' => [$this->tenantId],
|
||||
] + $this->seederParameters);
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue