Add syncPropValues method to Propable trait; update StoreProductRequest and UpdateProductRequest to handle props validation

This commit is contained in:
2026-06-22 12:36:41 -03:00
parent 894f2a68de
commit 054a3a81eb
5 changed files with 43 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Domains\Product\Requests;
use App\Domains\Product\Models\Product;
use App\Domains\Prop\Support\PropRules;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
@@ -33,6 +34,7 @@ class UpdateProductRequest extends FormRequest
'nombre' => ['required', 'string', 'max:255'],
'descripcion' => ['nullable', 'string'],
'precio' => ['required', 'numeric', 'min:0'],
...PropRules::sync(),
];
}
}