Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/DomainDelete.php
Show All 31 Lines | class DomainDelete extends Command | ||||
/** | /** | ||||
* Execute the console command. | * Execute the console command. | ||||
* | * | ||||
* @return mixed | * @return mixed | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$domain = \App\Domain::where('id', $this->argument('domain'))->first(); | $domain = \App\Domain::withEnvTenant()->where('id', $this->argument('domain'))->first(); | ||||
if (!$domain) { | if (!$domain) { | ||||
return 1; | return 1; | ||||
} | } | ||||
$domain->delete(); | $domain->delete(); | ||||
} | } | ||||
} | } |