where('egg_id', $egg)->count()) { throw new HasActiveServersException(trans('exceptions.nest.egg.delete_has_servers')); } $children = $this->repository->findCountWhere([['config_from', '=', $egg]]); if ($children > 0) { throw new HasChildrenException(trans('exceptions.nest.egg.has_children')); } return $this->repository->delete($egg); } }