private function addForeignConstraint($segments)
    {
        $string = sprintf(
            "%s:foreign:references('id'):on('%s')",
            $segments['name'],
            $this->getTableNameFromForeignKey($segments['name'])
        );

        $this->addField($this->parseSegments($string));
    }
private function addForeignConstraint($segments)
    {
        $string = sprintf(
            "%s:foreign:references('id'):on('%s')",
            $segments['name'],
            $this->getTableNameFromForeignKey($segments['name'])
        );

        $this->addField($this->parseSegments($string));
    }
private function addForeignConstraint ( $ segments ) { $ string = sprintf ( "%s:foreign:references('id'):on('%s')" , $ segments [ 'name' ] , $ this -> getTableNameFromForeignKey ( $ segments [ 'name' ] ) ) ; $ this -> addField ( $ this -> parseSegments ( $ string ) ) ; }
Add a foreign constraint field to the schema.

@param array $segments
Add a foreign constraint field to the schema .