1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-10-31 08:02:42 +01:00
BookStack/app/Console/Commands/RegenerateSearch.php
2017-03-19 12:48:44 +00:00

47 lines
909 B
PHP

<?php
namespace BookStack\Console\Commands;
use BookStack\Services\SearchService;
use Illuminate\Console\Command;
class RegenerateSearch extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'bookstack:regenerate-search';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
protected $searchService;
/**
* Create a new command instance.
*
* @param SearchService $searchService
*/
public function __construct(SearchService $searchService)
{
parent::__construct();
$this->searchService = $searchService;
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->searchService->indexAllEntities();
}
}