TestCommand.php 444 B

123456789101112131415161718192021
  1. <?php
  2. namespace app\common\command;
  3. use app\service\EsMobileService;
  4. use think\console\Command;
  5. use think\console\Input;
  6. use think\console\Output;
  7. class TestCommand extends Command{
  8. protected function configure()
  9. {
  10. $this->setName('test')->setDescription('test');
  11. }
  12. protected function execute(Input $input, Output $output)
  13. {
  14. es()->search([
  15. 'index'=>EsMobileService::index(),
  16. ]);
  17. }
  18. }