route('vehicle') ?? $this->route('id'); return [ 'photo_file_name' => ['nullable', 'string', 'max:255'], 'photo_file_url' => ['nullable', 'string', 'max:2048'], 'photo_mime_type' => ['nullable', 'string', 'max:100'], 'photo_size' => ['nullable', 'integer', 'min:0'], 'brand' => ['sometimes', 'required', 'string', 'max:255'], 'model' => ['sometimes', 'required', 'string', 'max:255'], 'registration_number' => ['sometimes', 'required', 'string', 'max:255', Rule::unique('vehicles', 'registration_number')->ignore($vehicleId)], 'vehicle_type' => ['nullable', Rule::in(['hearse', 'transport_vehicle', 'utility', 'sedan'])], 'fuel_type' => ['nullable', Rule::in(['diesel', 'petrol', 'electric', 'hybrid'])], 'year' => ['nullable', 'integer', 'min:1900', 'max:2100'], 'primary_user_id' => ['nullable', 'exists:employees,id'], 'status' => ['nullable', Rule::in(['active', 'maintenance', 'out_of_service'])], 'notes' => ['nullable', 'string'], ]; } }