Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/DomainSetStatus.php
Show All 23 Lines | class DomainSetStatus extends Command | ||||
/** | /** | ||||
* Execute the console command. | * Execute the console command. | ||||
* | * | ||||
* @return mixed | * @return mixed | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$domain = Domain::where('namespace', $this->argument('domain'))->first(); | $domain = Domain::withEnvTenant()->where('namespace', $this->argument('domain'))->first(); | ||||
if (!$domain) { | if (!$domain) { | ||||
return 1; | return 1; | ||||
} | } | ||||
Queue::fake(); // ignore LDAP for now | Queue::fake(); // ignore LDAP for now | ||||
$domain->status = (int) $this->argument('status'); | $domain->status = (int) $this->argument('status'); | ||||
$domain->save(); | $domain->save(); | ||||
$this->info($domain->status); | $this->info($domain->status); | ||||
} | } | ||||
} | } |