46 lines
No EOL
767 B
PHP
46 lines
No EOL
767 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use Cli\Commands\Command;
|
|
|
|
class TestCommand extends Command
|
|
{
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
public $signature = 'test:command';
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
public $description = 'A test command';
|
|
|
|
/**
|
|
* TestCommand constructor.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* @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;
|
|
}
|
|
|
|
} |