Page MenuHomePhorge

InfoCommand.php
No OneTemporary

Authored By
Unknown
Size
1009 B
Referenced Files
None
Subscribers
None

InfoCommand.php

<?php
namespace App\Console\Commands\Group;
use App\Console\Command;
class InfoCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'group:info {group}';
/**
* The console command description.
*
* @var string
*/
protected $description = "Print a group information.";
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$input = $this->argument('group');
$group = $this->getGroup($input);
if (empty($group)) {
$this->error("Group {$input} does not exist.");
return 1;
}
$this->info('Id: ' . $group->id);
$this->info('Email: ' . $group->email);
$this->info('Status: ' . $group->status);
// TODO: Print owner/wallet
foreach ($group->members as $member) {
$this->info('Member: ' . $member);
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 1:21 PM (1 d, 12 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18728448
Default Alt Text
InfoCommand.php (1009 B)

Event Timeline