Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/User/AliasesCommand.php
- This file was copied to src/app/Console/Commands/SharedFolder/AliasesCommand.php.
Show All 28 Lines | class AliasesCommand extends Command | ||||
{ | { | ||||
$user = $this->getUser($this->argument('user')); | $user = $this->getUser($this->argument('user')); | ||||
if (!$user) { | if (!$user) { | ||||
$this->error("User not found."); | $this->error("User not found."); | ||||
return 1; | return 1; | ||||
} | } | ||||
foreach ($user->aliases as $alias) { | foreach ($user->aliases()->pluck('alias')->all() as $alias) { | ||||
$this->info("{$alias->alias}"); | $this->info($alias); | ||||
} | } | ||||
} | } | ||||
} | } |