123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace App\Console\Commands;
- use Illuminate\Console\Command;
- use Nerd\CartesianProduct\CartesianProduct;
- class TestCommand extends Command
- {
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'test';
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = 'Command description';
- /**
- * Execute the console command.
- *
- * @return int
- */
- public function handle()
- {
- $cartesianProduct = new CartesianProduct();
- $cartesianProduct->appendSet(["a"]);
- dump($cartesianProduct->compute());
- $cartesianProduct = new CartesianProduct();
- $cartesianProduct->appendSet(["a"]);
- $cartesianProduct->appendSet(["b"]);
- dump($cartesianProduct->compute());
- }
- }
|