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