public function getRelation($relation)
{
$query = $this->getModel()->{$relation}();
// If there are nested relationships set on the query, we will put those onto
// the query instances so that they can be handled after this relationship
// is loaded. In this way they will all trickle down as they are loaded.
$nested = $this->nestedRelations($relation);
if (count($nested) > 0) {
$query->getQuery()->with($nested);
}
return $query;
}