protected function joinHasOneOrMany(HasOneOrMany $relation)
    {
        return $this->instance->join(
            $relation->getRelated()->getTable(),
            $relation->getRelated()->getTable() . '.' . $relation->getParent()->getForeignKey(),
            '=',
            $relation->getParent()->getTable() . '.' . $relation->getParent()->getKeyName()
        );
    }
protected function joinHasOneOrMany(HasOneOrMany $relation)
    {
        return $this->instance->join(
            $relation->getRelated()->getTable(),
            $relation->getRelated()->getTable() . '.' . $relation->getParent()->getForeignKey(),
            '=',
            $relation->getParent()->getTable() . '.' . $relation->getParent()->getKeyName()
        );
    }
protected function joinHasOneOrMany ( HasOneOrMany $ relation ) { return $ this -> instance -> join ( $ relation -> getRelated ( ) -> getTable ( ) , $ relation -> getRelated ( ) -> getTable ( ) . '.' . $ relation -> getParent ( ) -> getForeignKey ( ) , '=' , $ relation -> getParent ( ) -> getTable ( ) . '.' . $ relation -> getParent ( ) -> getKeyName ( ) ) ; }
Join a has one relationship.

@param HasOneOrMany $relation

@return mixed
Join a has one relationship .