mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 23:54:04 +00:00
Cleanup commands
This commit is contained in:
parent
8d382024a3
commit
33fcb8a936
6 changed files with 60 additions and 37 deletions
|
|
@ -4,6 +4,7 @@ namespace Stancl\Tenancy\Commands;
|
|||
|
||||
use Illuminate\Console\Command;
|
||||
use Stancl\Tenancy\DatabaseManager;
|
||||
use Stancl\Tenancy\Traits\HasATenantsOption;
|
||||
use Illuminate\Database\Migrations\Migrator;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Illuminate\Database\Console\Seeds\SeedCommand;
|
||||
|
|
@ -11,6 +12,8 @@ use Illuminate\Database\ConnectionResolverInterface;
|
|||
|
||||
class Seed extends SeedCommand
|
||||
{
|
||||
use HasATenantsOption;
|
||||
|
||||
protected $database;
|
||||
|
||||
/**
|
||||
|
|
@ -51,20 +54,8 @@ class Seed extends SeedCommand
|
|||
$this->line("Tenant: {$tenant['uuid']} ({$tenant['domain']})");
|
||||
$this->database->connectToTenant($tenant);
|
||||
|
||||
// Migrate
|
||||
// Seed
|
||||
parent::handle();
|
||||
});
|
||||
}
|
||||
|
||||
protected function getOptions()
|
||||
{
|
||||
return array_merge([
|
||||
['tenants', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, '', null]
|
||||
], parent::getOptions());
|
||||
}
|
||||
|
||||
protected function getMigrationPaths()
|
||||
{
|
||||
return [database_path('migrations/tenant')];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue