<?php

namespace App\Console\Commands\Wechat;

use App\Services\WeChat\WechatFactory;
use Illuminate\Console\Command;

class TagCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'wechat:tag';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '公众号tag';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    private $publicId;

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $this->publicId = $this->ask("公众号ID");
        dump(WechatFactory::Tags($this->publicId)->get());
    }
}
