protected function getIndexes($indexes)
    {
        $existingNames = [];
        $finalIndexes = [];
        foreach ($indexes as $index) {
            $newIndex = Index::fromString($index);
            if (!empty($newIndex->getName()) && in_array($newIndex->getName(), $existingNames)) {
                continue;
            }

            $finalIndexes[] = $newIndex;
            $existingNames[] = $newIndex->getName();
        }

        return $finalIndexes;
    }
protected function getIndexes($indexes)
    {
        $existingNames = [];
        $finalIndexes = [];
        foreach ($indexes as $index) {
            $newIndex = Index::fromString($index);
            if (!empty($newIndex->getName()) && in_array($newIndex->getName(), $existingNames)) {
                continue;
            }

            $finalIndexes[] = $newIndex;
            $existingNames[] = $newIndex->getName();
        }

        return $finalIndexes;
    }
protected function getIndexes ( $ indexes ) { $ existingNames = [ ] ; $ finalIndexes = [ ] ; foreach ( $ indexes as $ index ) { $ newIndex = Index :: fromString ( $ index ) ; if ( ! empty ( $ newIndex -> getName ( ) ) && in_array ( $ newIndex -> getName ( ) , $ existingNames ) ) { continue ; } $ finalIndexes [ ] = $ newIndex ; $ existingNames [ ] = $ newIndex -> getName ( ) ; } return $ finalIndexes ; }
Get the indexes from an existing array.

@param array $relations

@return array
Get the indexes from an existing array .