Test.php 677 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app\command;
  4. use app\admin\model\TaxiCar;
  5. use app\admin\model\TaxiChauffeur;
  6. use think\console\Command;
  7. use think\console\Input;
  8. use think\console\Output;
  9. use think\facade\Log;
  10. class Test extends Command
  11. {
  12. protected function configure()
  13. {
  14. // 指令配置
  15. $this->setName('test')
  16. ->setDescription('the test command');
  17. }
  18. protected function execute(Input $input, Output $output)
  19. {
  20. // 业务逻辑
  21. //(new TaxiChauffeur())->getChauffeurData();
  22. (new TaxiCar())->editData();
  23. //日志记录
  24. Log::channel('test')->info('日志信息测试');
  25. }
  26. }