| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace App\Console\Commands;
- use Illuminate\Console\Command;
- use App\Tools\PaliSearch;
- class TestSearchPali extends Command
- {
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'test:search.pali';
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = 'Command description';
- /**
- * Create a new command instance.
- *
- * @return void
- */
- public function __construct()
- {
- parent::__construct();
- }
- /**
- * Execute the console command.
- *
- * @return int
- */
- public function handle()
- {
- $word = 'citta';
- $result = PaliSearch::search([$word],[],'case',0,3);
- $this->info("word={$word} total=".$result['total']);
- $result = PaliSearch::search([$word],[267],'case',0,3);
- $this->info("word={$word} book=267 total=".$result['total']);
- return 0;
- }
- }
|