Skip to content

Commit

Permalink
Make portions of the install optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Braden Keith committed Aug 5, 2019
1 parent 5bfc38d commit ee3d2e2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ class InstallCommand extends Command
*
* @var string
*/
protected $signature = 'multitenancy:install';
protected $signature = 'multitenancy:install
{--M|migrations= : Run migrations}
{--R|roles= : Add super admin role}
{--T|tenant= : Add admin tenant}';

/**
* The console command description.
Expand Down Expand Up @@ -47,9 +50,9 @@ public function __construct(Multitenancy $multitenancy)
*/
public function handle()
{
$this->handleMigrations();
$this->addSuperAdminRole();
$this->addAdminTenant();
$this->option('migrations') ?? $this->handleMigrations();
$this->option('roles') ?? $this->addSuperAdminRole();
$this->option('tenant') ?? $this->addAdminTenant();

return 1;
}
Expand Down

0 comments on commit ee3d2e2

Please sign in to comment.