1.在Console/Commands 腳本文件中,handle()方法里給命令行在執(zhí)行中的提示
$this->line() 簡單的輸出(白色)
$this->info() 綠色輸出,可代表完成
$this->error() 紅色的輸出,可代表拋錯
2.關于try catch使用
try{
throw new Exception('出錯');
throw new OtherException('出錯');
}catch(\Exception $e){
return $e->getMessage();
}catch(\OtherException $e){
return $e->getMessage();
}