Update command factory. Update command collection

This commit is contained in:
Maarten 2020-01-07 22:15:50 +01:00
parent 0be2f14e95
commit dbe88b7f2b
7 changed files with 225 additions and 45 deletions

View file

@ -2,12 +2,16 @@
namespace App\Console\Commands;
class TestCommand {
use Cli\Commands\Command;
use Runtime\Contracts\Console\Command as CommandInterface;
class TestCommand extends Command implements CommandInterface
{
/**
* @var string
*/
public $signature = 'test';
public $signature = 'test:command';
/**
* @var string
@ -16,17 +20,26 @@ class TestCommand {
/**
* TestCommand constructor.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* @return mixed;
* @return mixed
*/
public function handle()
{
$name = $this->ask('What is your name? ');
$this->printLn($this->argument('test'));
$this->success('Succcess: Hello ' . $name);
$this->warning('Warning: Hello ' . $name);
$this->error('Error: Hello ' . $name);
return true;
}