public function renderCreateIndexes()
    {
        $indexes = $this->getTableIndexes();
        if (!$indexes) {
            return '';
        }
        $source = '';
        foreach ($indexes as $index) {
            $columns = $this->serializeArrayToAttributes($index->getColumns());
            $name    = $this->serializeIndexNameToAttribute($index->getName());
            if ($index->isPrimary()) {
                $source .= "\n" . '$table->primary(' . $columns . ', ' . $name . ');';
            } elseif ($index->isUnique()) {
                $source .= "\n" . '$table->unique(' . $columns . ', ' . $name . ');';
            } else {
                $source .= "\n" . '$table->index(' . $columns . ', ' . $name . ');';
            }
        }

        return trim($source);
    }
public function renderCreateIndexes()
    {
        $indexes = $this->getTableIndexes();
        if (!$indexes) {
            return '';
        }
        $source = '';
        foreach ($indexes as $index) {
            $columns = $this->serializeArrayToAttributes($index->getColumns());
            $name    = $this->serializeIndexNameToAttribute($index->getName());
            if ($index->isPrimary()) {
                $source .= "\n" . '$table->primary(' . $columns . ', ' . $name . ');';
            } elseif ($index->isUnique()) {
                $source .= "\n" . '$table->unique(' . $columns . ', ' . $name . ');';
            } else {
                $source .= "\n" . '$table->index(' . $columns . ', ' . $name . ');';
            }
        }

        return trim($source);
    }
public function renderCreateIndexes ( ) { $ indexes = $ this -> getTableIndexes ( ) ; if ( ! $ indexes ) { return '' ; } $ source = '' ; foreach ( $ indexes as $ index ) { $ columns = $ this -> serializeArrayToAttributes ( $ index -> getColumns ( ) ) ; $ name = $ this -> serializeIndexNameToAttribute ( $ index -> getName ( ) ) ; if ( $ index -> isPrimary ( ) ) { $ source .= "\n" . '$table->primary(' . $ columns . ', ' . $ name . ');' ; } elseif ( $ index -> isUnique ( ) ) { $ source .= "\n" . '$table->unique(' . $ columns . ', ' . $ name . ');' ; } else { $ source .= "\n" . '$table->index(' . $ columns . ', ' . $ name . ');' ; } } return trim ( $ source ) ; }
Render table indexes create schema builder methods

@return string
Render table indexes create schema builder methods