Files
sam-api/app/Http/Requests/Product/ProductUpdateRequest.php
hskwon 78e3934baf feat: Product API에 FormRequest 및 i18n 적용
- ProductStoreRequest, ProductUpdateRequest 생성
- ProductController에 FormRequest 적용
- 하드코딩된 메시지를 i18n 키로 변경
- lang/ko/message.php에 product 관련 메시지 키 추가
- SAM API Development Rules 준수

Phase 3-1: ProductApi.php Swagger 점검 완료
2025-11-07 02:29:51 +09:00

29 lines
790 B
PHP

<?php
namespace App\Http\Requests\Product;
use Illuminate\Foundation\Http\FormRequest;
class ProductUpdateRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'code' => 'sometimes|string|max:30',
'name' => 'sometimes|string|max:100',
'category_id' => 'sometimes|integer',
'product_type' => 'sometimes|string|max:30',
'attributes' => 'nullable|array',
'description' => 'nullable|string|max:255',
'is_sellable' => 'nullable|in:0,1',
'is_purchasable' => 'nullable|in:0,1',
'is_producible' => 'nullable|in:0,1',
'is_active' => 'nullable|in:0,1',
];
}
}