setName('menu:format') ->setDescription('the format menu command'); } /** * @param Input $input * @param Output $output * @return int|void|null * @author zfy * @day 2020/8/26 */ protected function execute(Input $input, Output $output) { $output->writeln('开启修复'); $menuRepository = app()->make(MenuRepository::class); $menuRepository->formatPath(0); $menuRepository->formatPath(1); $output->writeln('执行成功'); } }