feat: add descriptions for product table

This commit is contained in:
2025-09-18 14:12:02 +03:30
parent 04bbcb831a
commit e44d4064df
3 changed files with 38 additions and 0 deletions
@@ -31,6 +31,8 @@ public function store(Request $request, $packageName)
'title' => 'string|required',
'price' => 'integer|required',
'type' => ['integer', Rule::in(Product::TYPES)],
'descriptions' => 'array|nullable',
'descriptions.*' => 'string|max:1000',
]);
if (!$packageName = PackageName::with('products')->where('name', $packageName)->first()) {
@@ -49,6 +51,8 @@ public function update(Request $request, $packageName, $productId)
'title' => 'string|required',
'price' => 'integer|required',
'type' => ['integer', Rule::in(Product::TYPES)],
'descriptions' => 'array|nullable',
'descriptions.*' => 'string|max:1000'
]);
if (!$packageName = PackageName::with('products')->where('name', $packageName)->first()) {