标签:技术分享 out where shadow ext tab code ado ges
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]]);
}
}
应用代码中调用artisan
Artisan::call(‘command:test‘);
标签:技术分享 out where shadow ext tab code ado ges
原文地址:http://blog.51cto.com/phpme/2321284