| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace App\Http\Requests\Order;
- use Illuminate\Foundation\Http\FormRequest;
- class StoreOrderRequest 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 [
- 'id' => 'nullable|exists:orders,id',
- 'name' => 'nullable|string',
- 'user_id' => 'nullable|exists:users,id',
- 'district_id' => 'nullable|exists:districts,id',
- 'area_id' => 'nullable|exists:areas,id',
- 'object_address' => 'nullable|string|min:5',
- 'object_type_id' => 'nullable|exists:object_types,id',
- 'comment' => 'nullable|string',
- 'installation_date' => 'nullable|date',
- 'ready_date' => 'nullable|date',
- 'brigadier_id' => 'nullable|exists:users,id',
- 'tg_group_name' => 'nullable|string',
- 'tg_group_link' => 'nullable|string',
- 'products' => 'nullable|array',
- 'quantity' => 'nullable|array',
- 'products_sku' => 'nullable|array',
- 'order_status_id' => 'nullable|exists:order_statuses,id',
- 'install_days' => 'nullable|integer|min:1',
- ];
- }
- }
|