Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/UserDomains.php
Show All 34 Lines | class UserDomains extends Command | ||||
/** | /** | ||||
* Execute the console command. | * Execute the console command. | ||||
* | * | ||||
* @return mixed | * @return mixed | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$user = User::where('email', $this->argument('userid'))->first(); | $user = User::withEnvTenant()->where('email', $this->argument('userid'))->first(); | ||||
if (!$user) { | if (!$user) { | ||||
return 1; | return 1; | ||||
} | } | ||||
foreach ($user->domains() as $domain) { | foreach ($user->domains() as $domain) { | ||||
$this->info("{$domain->namespace}"); | $this->info("{$domain->namespace}"); | ||||
} | } | ||||
} | } | ||||
} | } |