Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/DomainSuspend.php
Show All 32 Lines | class DomainSuspend 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; | ||||
} | } | ||||
$this->info("Found domain: {$domain->id}"); | $this->info("Found domain: {$domain->id}"); | ||||
$domain->suspend(); | $domain->suspend(); | ||||
} | } | ||||
} | } |