Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/Group/InfoCommand.php
Show All 22 Lines | class InfoCommand extends Command | ||||
/** | /** | ||||
* Execute the console command. | * Execute the console command. | ||||
* | * | ||||
* @return mixed | * @return mixed | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$input = $this->argument('group'); | $input = $this->argument('group'); | ||||
$group = $this->getObject(\App\Group::class, $input, 'email'); | $group = $this->getGroup($input); | ||||
if (empty($group)) { | if (empty($group)) { | ||||
$this->error("Group {$input} does not exist."); | $this->error("Group {$input} does not exist."); | ||||
return 1; | return 1; | ||||
} | } | ||||
$this->info('Id: ' . $group->id); | $this->info('Id: ' . $group->id); | ||||
$this->info('Email: ' . $group->email); | $this->info('Email: ' . $group->email); | ||||
Show All 9 Lines |