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() | ||||
{ | { | ||||
DB::enableQueryLog(); | |||||
$user = User::where('email', $this->argument('userid'))->first(); | $user = User::where('email', $this->argument('userid'))->first(); | ||||
$this->info("Found user: {$user->id}"); | $this->info("Found user: {$user->id}"); | ||||
foreach ($user->domains() as $domain) { | foreach ($user->domains() as $domain) { | ||||
$this->info("Domain: {$domain->namespace}"); | $this->info("Domain: {$domain->namespace}"); | ||||
} | } | ||||
dd(DB::getQueryLog()); | |||||
} | } | ||||
} | } |