| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace App\Http\Requests;
- use Illuminate\Foundation\Http\FormRequest;
- class StoreProductRequest 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 [
- 'article' => 'required|string',
- 'name_tz' => 'required|string',
- 'type_tz' => 'required|string',
- 'nomenclature_number' => 'required|string',
- 'sizes' => 'required|string',
- 'manufacturer' => 'required|string',
- 'unit' => 'required|string',
- 'type' => 'required|string',
- 'product_price' => 'required|numeric',
- 'installation_price' => 'required|numeric',
- 'total_price' => 'required|numeric',
- 'manufacturer_name' => 'required|string',
- 'note' => 'nullable|string',
- 'passport_name' => 'nullable|string',
- 'statement_name' => 'nullable|string',
- 'service_life' => 'nullable|string',
- 'certificate_number' => 'nullable|string',
- 'certificate_date' => 'nullable|string',
- 'certificate_issuer' => 'nullable|string',
- 'certificate_type' => 'nullable|string',
- 'weight' => 'nullable|numeric',
- 'volume' => 'nullable|nullable',
- 'places' => 'nullable|integer',
- ];
- }
- }
|