public function getForeignRelation()
    {
        $params = [
            $this->getReferencesModel(),
            $this->column,
            $this->on,
        ];

        $prefix = $this->isSelfReference() ? 'parent_' : '';

        $relation = new ForeignRelationship(
            'belongsTo',
            $params,
            $this->getForeignModelName($prefix)
        );

        return $relation;
    }
public function getForeignRelation()
    {
        $params = [
            $this->getReferencesModel(),
            $this->column,
            $this->on,
        ];

        $prefix = $this->isSelfReference() ? 'parent_' : '';

        $relation = new ForeignRelationship(
            'belongsTo',
            $params,
            $this->getForeignModelName($prefix)
        );

        return $relation;
    }
public function getForeignRelation ( ) { $ params = [ $ this -> getReferencesModel ( ) , $ this -> column , $ this -> on , ] ; $ prefix = $ this -> isSelfReference ( ) ? 'parent_' : '' ; $ relation = new ForeignRelationship ( 'belongsTo' , $ params , $ this -> getForeignModelName ( $ prefix ) ) ; return $ relation ; }
Get a foreign relation.

@return CrestApps\CodeGenerator\Models\ForeignRelatioship
Get a foreign relation .