12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- declare (strict_types=1);
- namespace app\command;
- use app\common\repositories\system\auth\MenuRepository;
- use think\console\Command;
- use think\console\Input;
- use think\console\Output;
- class FormatMenuPath extends Command
- {
-
- protected function configure()
- {
-
- $this->setName('menu:format')
- ->setDescription('the format menu command');
- }
-
- protected function execute(Input $input, Output $output)
- {
- $output->writeln('开启修复');
- $menuRepository = app()->make(MenuRepository::class);
- $menuRepository->formatPath(0);
- $menuRepository->formatPath(1);
- $output->writeln('执行成功');
- }
- }
|