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));
}
}