From 0659f67e842fd4654a47a3b3a2800a95c1b7ce53 Mon Sep 17 00:00:00 2001 From: ale Date: Wed, 17 Jul 2024 17:25:08 -0300 Subject: [PATCH] cambio en validacion --- app/Http/Controllers/Api/SubpedidoController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/SubpedidoController.php b/app/Http/Controllers/Api/SubpedidoController.php index 668030d..0f7c81c 100644 --- a/app/Http/Controllers/Api/SubpedidoController.php +++ b/app/Http/Controllers/Api/SubpedidoController.php @@ -103,9 +103,9 @@ class SubpedidoController extends Controller $valid = request()->validate([ 'total' => 'required|min:0', - 'notas' => 'min:1', + 'notas' => 'min:0' ]); - $subpedido->syncDevoluciones($valid['total'], $valid['notas']); + $subpedido->syncDevoluciones($valid['total'], $valid['notas'] ?? ""); return new SubpedidoResource($subpedido); }