| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace App\Http\Requests;
- use Illuminate\Foundation\Http\FormRequest;
- class ProductSKUStoreRequest extends FormRequest
- {
- /**
- * Determine if the user is authorized to make this request.
- */
- public function authorize(): bool
- {
- return auth()->check();
- }
- /**
- * Get the validation rules that apply to the request.
- *
- * @return array
- */
- public function rules(): array
- {
- return [
- 'product_id' => 'required|exists:products,id',
- 'order_id' => 'nullable|exists:orders,id',
- 'status' => 'nullable|string',
- 'rfid' => 'nullable|string',
- 'factory_number' => 'nullable|string',
- 'manufacturer_date' => 'nullable|date',
- 'service_life' => 'nullable|integer',
- 'certificate_number' => 'nullable|string',
- 'certificate_date' => 'nullable|date',
- 'certificate_issuer' => 'nullable|string',
- 'certificate_type' => 'nullable|string',
- ];
- }
- }
|