public function getForeignKeyName()
    {
        $key = $this->getQualifiedForeignKeyName();

        if (is_array($key)) { //Check for multi-columns relationship
            return array_map(function ($k) {
                $segments = explode('.', $k);

                return $segments[count($segments) - 1];
            }, $key);
        } else {
            $segments = explode('.', $key);

            return $segments[count($segments) - 1];
        }
    }
public function getForeignKeyName()
    {
        $key = $this->getQualifiedForeignKeyName();

        if (is_array($key)) { //Check for multi-columns relationship
            return array_map(function ($k) {
                $segments = explode('.', $k);

                return $segments[count($segments) - 1];
            }, $key);
        } else {
            $segments = explode('.', $key);

            return $segments[count($segments) - 1];
        }
    }
public function getForeignKeyName ( ) { $ key = $ this -> getQualifiedForeignKeyName ( ) ; if ( is_array ( $ key ) ) { //Check for multi-columns relationship return array_map ( function ( $ k ) { $ segments = explode ( '.' , $ k ) ; return $ segments [ count ( $ segments ) - 1 ] ; } , $ key ) ; } else { $ segments = explode ( '.' , $ key ) ; return $ segments [ count ( $ segments ) - 1 ] ; } }
Get the plain foreign key.

@return string
Get the plain foreign key .