| 1 | <?php |
||
| 18 | class IndexAllEmployees extends Command |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * The name and signature of the console command. |
||
| 22 | * |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $signature = 'elasticsearch:employees'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * The console command description. |
||
| 29 | * |
||
| 30 | * @var string |
||
| 31 | */ |
||
| 32 | protected $description = 'Index all employee document to elastic search client'; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var Elastic |
||
| 36 | */ |
||
| 37 | protected $elastic; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @var Employee |
||
| 41 | */ |
||
| 42 | protected $employee; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Create a new command instance. |
||
| 46 | * |
||
| 47 | * @param Elastic $elastic |
||
| 48 | * @param Employee $employee |
||
| 49 | */ |
||
| 50 | 2 | public function __construct(Elastic $elastic, Employee $employee) |
|
| 57 | |||
| 58 | /** |
||
| 59 | * Execute the console command. |
||
| 60 | * |
||
| 61 | * @return mixed |
||
| 62 | */ |
||
| 63 | 2 | public function handle() |
|
| 79 | } |
||
| 80 |