فهرست منبع

添加word参数

visuddhinanda 2 سال پیش
والد
کامیت
c0e50cbf0f
1فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 5 2
      app/Console/Commands/TestSearchPali.php

+ 5 - 2
app/Console/Commands/TestSearchPali.php

@@ -12,7 +12,7 @@ class TestSearchPali extends Command
      *
      * @var string
      */
-    protected $signature = 'test:search.pali';
+    protected $signature = 'test:search.pali {word?}';
 
     /**
      * The console command description.
@@ -38,7 +38,10 @@ class TestSearchPali extends Command
      */
     public function handle()
     {
-        $word = 'citta';
+        $word = $this->argument('word');
+        if(empty($word)){
+            $word = 'citta';
+        }
         $result = PaliSearch::search([$word],[],'case',0,3);
         if($result){
             $this->info("word={$word} total=".$result['total']);