12345678910111213141516171819202122232425262728293031 |
- <?php
- declare (strict_types = 1);
- namespace app\command;
- use app\admin\model\TaxiCar;
- use app\admin\model\TaxiChauffeur;
- use think\console\Command;
- use think\console\Input;
- use think\console\Output;
- use think\facade\Log;
- class Test extends Command
- {
- protected function configure()
- {
- // 指令配置
- $this->setName('test')
- ->setDescription('the test command');
- }
- protected function execute(Input $input, Output $output)
- {
- // 业务逻辑
- //(new TaxiChauffeur())->getChauffeurData();
- (new TaxiCar())->editData();
- //日志记录
- Log::channel('test')->info('日志信息测试');
- }
- }
|