console命令行交互

public function handle()
    {
        $name=$this->ask('What is your neme?');
        $city=$this->choice('Where is your city?',[
            'Beijing','Shanghai','Wuhan'
        ]);
        $age=$this->secret('How old are you?');

        if($this->confirm('output ok?')){
            $this->table(['NAME','CITY','AGE'],[[$name,$city,$age]]);
        }
    }
`````
![](http://i2.51cto.com/images/blog/201811/23/31c0fc5793132146e9cd35e3d3c72667.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=)

>应用代码中调用artisan

````
Artisan::call('command:test');
````