src/Mediable.php
private function mediaQualifiedForeignKey()
    {
        $relation = $this->media();
        if (method_exists($relation, 'getQualifiedForeignPivotKeyName')) {
            return $relation->getQualifiedForeignPivotKeyName();
        } elseif (method_exists($relation, 'getQualifiedForeignKeyName')) {
            return $relation->getQualifiedForeignKeyName();
        }
        return $relation->getForeignKey();
    }
private function mediaQualifiedForeignKey()
    {
        $relation = $this->media();
        if (method_exists($relation, 'getQualifiedForeignPivotKeyName')) {
            return $relation->getQualifiedForeignPivotKeyName();
        } elseif (method_exists($relation, 'getQualifiedForeignKeyName')) {
            return $relation->getQualifiedForeignKeyName();
        }
        return $relation->getForeignKey();
    }
private function mediaQualifiedForeignKey ( ) { $ relation = $ this -> media ( ) ; if ( method_exists ( $ relation , 'getQualifiedForeignPivotKeyName' ) ) { return $ relation -> getQualifiedForeignPivotKeyName ( ) ; } elseif ( method_exists ( $ relation , 'getQualifiedForeignKeyName' ) ) { return $ relation -> getQualifiedForeignKeyName ( ) ; } return $ relation -> getForeignKey ( ) ; }
Key the name of the foreign key field of the media relation

Accounts for the change of method name in Laravel 5.4

@return string
Key the name of the foreign key field of the media relation