Page MenuHomePhorge

InfoCommand.php
No OneTemporary

Size
1 KB
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->getObject(\App\Group::class, $input, 'email');
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
Thu, Jul 9, 9:24 PM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1057212
Default Alt Text
InfoCommand.php (1 KB)

Event Timeline