protected function createReferenceName(array $columns, $on, array $references)
    {
        $strColumns = implode('_', $columns);
        $strReferences = implode('_', $references);

        $rawReferenceName = [$this->table, $strColumns, 'foreign', $on, $strReferences];

        $rawReferenceName = array_map(function ($value) {
            return trim(str_replace(['-', '.'], '_', $value), '_');
        }, $rawReferenceName);

        $rawReferenceName = array_filter($rawReferenceName);

        $index = strtolower(trim(implode('_', $rawReferenceName), '_'));

        return $index;
    }
protected function createReferenceName(array $columns, $on, array $references)
    {
        $strColumns = implode('_', $columns);
        $strReferences = implode('_', $references);

        $rawReferenceName = [$this->table, $strColumns, 'foreign', $on, $strReferences];

        $rawReferenceName = array_map(function ($value) {
            return trim(str_replace(['-', '.'], '_', $value), '_');
        }, $rawReferenceName);

        $rawReferenceName = array_filter($rawReferenceName);

        $index = strtolower(trim(implode('_', $rawReferenceName), '_'));

        return $index;
    }
protected function createReferenceName ( array $ columns , $ on , array $ references ) { $ strColumns = implode ( '_' , $ columns ) ; $ strReferences = implode ( '_' , $ references ) ; $ rawReferenceName = [ $ this -> table , $ strColumns , 'foreign' , $ on , $ strReferences ] ; $ rawReferenceName = array_map ( function ( $ value ) { return trim ( str_replace ( [ '-' , '.' ] , '_' , $ value ) , '_' ) ; } , $ rawReferenceName ) ; $ rawReferenceName = array_filter ( $ rawReferenceName ) ; $ index = strtolower ( trim ( implode ( '_' , $ rawReferenceName ) , '_' ) ) ; return $ index ; }
Create a default index name for the table.

@param  array  $columns
@param  string $on
@param  array  $references

@return string
Create a default index name for the table .