protected function reindexModel(Model $model)
    {
        $mapping = $this->option('mapping') ? json_decode(File::get($this->option('mapping')), true) : null;

        $this->info('---> Reindexing ' . get_class($model));

        $model->reindex(
            $this->option('relations'),
            $this->option('batch'),
            $mapping,
            function ($batch)
            {
                $this->info("* Batch ${batch}");
            }
        );
    }
protected function reindexModel(Model $model)
    {
        $mapping = $this->option('mapping') ? json_decode(File::get($this->option('mapping')), true) : null;

        $this->info('---> Reindexing ' . get_class($model));

        $model->reindex(
            $this->option('relations'),
            $this->option('batch'),
            $mapping,
            function ($batch)
            {
                $this->info("* Batch ${batch}");
            }
        );
    }
protected function reindexModel ( Model $ model ) { $ mapping = $ this -> option ( 'mapping' ) ? json_decode ( File :: get ( $ this -> option ( 'mapping' ) ) , true ) : null ; $ this -> info ( '---> Reindexing ' . get_class ( $ model ) ) ; $ model -> reindex ( $ this -> option ( 'relations' ) , $ this -> option ( 'batch' ) , $ mapping , function ( $ batch ) { $ this -> info ( "* Batch ${batch}" ) ; } ) ; }
Reindex a model to Elasticsearch

@param Model $model
Reindex a model to Elasticsearch