TestAITerm.php 857 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace App\Console\Commands;
  3. use Illuminate\Console\Command;
  4. use App\Services\AITermService;
  5. class TestAITerm extends Command
  6. {
  7. /**
  8. * The name and signature of the console command.
  9. *
  10. * @var string
  11. */
  12. protected $signature = 'test:ai.term';
  13. /**
  14. * The console command description.
  15. *
  16. * @var string
  17. */
  18. protected $description = 'Command description';
  19. /**
  20. * Execute the console command.
  21. */
  22. public function handle()
  23. {
  24. //
  25. // ===== 创建 Service =====
  26. $service = app(AITermService::class);
  27. $service->setModel('dd81ce6c-e9ff-46b2-b1af-947728ba996e');
  28. // ===== 执行 =====
  29. $result = $service->create('f3ba16e5-862d-49c4-b5b0-39ab8b8ca4f4');
  30. // ===== 调试输出(建议保留)=====
  31. dump($result);
  32. }
  33. }