diff --git a/app/Console/Commands/DemoCommand.php b/app/Console/Commands/DemoCommand.php index d7eb79d..7b5e31e 100644 --- a/app/Console/Commands/DemoCommand.php +++ b/app/Console/Commands/DemoCommand.php @@ -4,7 +4,6 @@ namespace App\Console\Commands; -use Psr\Container\ContainerInterface; use SwooleTW\Hyperf\Foundation\Console\Command; class DemoCommand extends Command @@ -12,18 +11,8 @@ class DemoCommand extends Command protected ?string $signature = 'demo:hi {--name= : name}'; protected string $description = 'Hyperf Demo Command'; - public function __construct(protected ContainerInterface $container) - { - parent::__construct(); - } - - public function configure() - { - parent::configure(); - } - public function handle() { - $this->line('Hello ' . ($this->option('name') ?: 'Hyperf'), 'info'); + $this->info('Hello ' . ($this->option('name') ?: 'Hyperf')); } }