Skip to content

Pretty Console

The pretty console component for Hyperf.

Pretty Console

安装

shell
composer require friendsofhyperf/pretty-console

使用

php
<?php
use FriendsOfHyperf\PrettyConsole\Traits\Prettyable;
use Hyperf\Command\Command as HyperfCommand;
use Hyperf\Command\Annotation\Command;

#[Command]
class FooCommand extends HyperfCommand
{
    use Prettyable;

    public function function handle()
    {
        $this->components->info('Your message here.');
    }
}

鸣谢