mirror of
https://github.com/archtechx/tenancy.git
synced 2026-09-20 13:34:04 +00:00
Restore explanatory comments in Seed::__construct and configure()
This commit is contained in:
parent
5a5ab2baf6
commit
dd34ebd64d
1 changed files with 8 additions and 0 deletions
|
|
@ -20,6 +20,10 @@ class Seed extends SeedCommand
|
|||
{
|
||||
parent::__construct($resolver);
|
||||
|
||||
// Our --tenants/--skip-tenants/--with-pending options only get added automatically
|
||||
// when the parent command isn't signature-based. Since Laravel 13.24, SeedCommand is,
|
||||
// so we add them ourselves here -- checking first so we don't add them twice on older
|
||||
// Laravel versions, where they're already there by this point.
|
||||
if (! $this->getDefinition()->hasOption('tenants')) {
|
||||
$this->specifyParameters();
|
||||
}
|
||||
|
|
@ -29,6 +33,10 @@ class Seed extends SeedCommand
|
|||
{
|
||||
parent::configure();
|
||||
|
||||
// We inherit SeedCommand's name ('db:seed') since we don't redeclare $name/$signature,
|
||||
// so without this we'd overwrite Laravel's own db:seed command (see #1474). configure()
|
||||
// always runs after the name is set, regardless of Laravel version, so setting it here
|
||||
// is safe no matter which of $name/$signature the installed Laravel version uses.
|
||||
$this->setName('tenants:seed');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue