private function nestedRelation($relation) { if ($this->direction == 'restore') { return $relation->withTrashed(); } return $relation; }