protected function getReferencingModel($name)
    {
        if (!$this->isRelationMapped($name)) {
            return null;
        }

        $table = $this->getReferencingTable($name);
        $model = static::getModelFromTable($table);

        return $model;
    }
protected function getReferencingModel($name)
    {
        if (!$this->isRelationMapped($name)) {
            return null;
        }

        $table = $this->getReferencingTable($name);
        $model = static::getModelFromTable($table);

        return $model;
    }
protected function getReferencingModel ( $ name ) { if ( ! $ this -> isRelationMapped ( $ name ) ) { return null ; } $ table = $ this -> getReferencingTable ( $ name ) ; $ model = static :: getModelFromTable ( $ table ) ; return $ model ; }
Gets the referenced model via its table using relation name.

@param $name

@return string
Gets the referenced model via its table using relation name .