src/Console/ElasticIndexCreateCommand.php
protected function createWriteAlias()
    {
        $configurator = $this->getIndexConfigurator();

        if (! in_array(Migratable::class, class_uses_recursive($configurator))) {
            return;
        }

        $payload = (new IndexPayload($configurator))
            ->set('name', $configurator->getWriteAlias())
            ->get();

        ElasticClient::indices()
            ->putAlias($payload);

        $this->info(sprintf(
            'The %s alias for the %s index was created!',
            $configurator->getWriteAlias(),
            $configurator->getName()
        ));
    }
protected function createWriteAlias()
    {
        $configurator = $this->getIndexConfigurator();

        if (! in_array(Migratable::class, class_uses_recursive($configurator))) {
            return;
        }

        $payload = (new IndexPayload($configurator))
            ->set('name', $configurator->getWriteAlias())
            ->get();

        ElasticClient::indices()
            ->putAlias($payload);

        $this->info(sprintf(
            'The %s alias for the %s index was created!',
            $configurator->getWriteAlias(),
            $configurator->getName()
        ));
    }
protected function createWriteAlias ( ) { $ configurator = $ this -> getIndexConfigurator ( ) ; if ( ! in_array ( Migratable :: class , class_uses_recursive ( $ configurator ) ) ) { return ; } $ payload = ( new IndexPayload ( $ configurator ) ) -> set ( 'name' , $ configurator -> getWriteAlias ( ) ) -> get ( ) ; ElasticClient :: indices ( ) -> putAlias ( $ payload ) ; $ this -> info ( sprintf ( 'The %s alias for the %s index was created!' , $ configurator -> getWriteAlias ( ) , $ configurator -> getName ( ) ) ) ; }
Create an write alias.

@return void
Create an write alias .