protected function getDynamicRelationship($name)
    {
        // Dynamically get the relationship
        if ($this->isRelationship($name)) {
            // Use the relationship already loaded
            if (array_key_exists($name, $this->getRelations())) {
                return $this->getRelation($name);
            }

            // Load the relationship
            return $this->getRelationshipFromMethod($name, camel_case($name));
        }
    }
protected function getDynamicRelationship($name)
    {
        // Dynamically get the relationship
        if ($this->isRelationship($name)) {
            // Use the relationship already loaded
            if (array_key_exists($name, $this->getRelations())) {
                return $this->getRelation($name);
            }

            // Load the relationship
            return $this->getRelationshipFromMethod($name, camel_case($name));
        }
    }
protected function getDynamicRelationship ( $ name ) { // Dynamically get the relationship if ( $ this -> isRelationship ( $ name ) ) { // Use the relationship already loaded if ( array_key_exists ( $ name , $ this -> getRelations ( ) ) ) { return $ this -> getRelation ( $ name ) ; } // Load the relationship return $ this -> getRelationshipFromMethod ( $ name , camel_case ( $ name ) ) ; } }
Get a dynamically resolved relationship.

@param string $name

@return mixed
Get a dynamically resolved relationship .