burgov/key-value-form-bundle
value_type (e.g., TextType, ChoiceType, DateType) and key_type, enabling flexibility for different data models.FormComponent is not natively supported). Options:
spatie/laravel-symfony-support) to integrate Symfony forms.collective/html or custom Blade components).FormBuilder).FormRequest, Arrayable, or custom Blade components)?// app/Http/Requests/KeyValueRequest.php
public function rules(): array {
return [
'*.key' => 'required|string',
'*.value' => 'required|string', // Customize per use case
];
}
Render with Blade:
@foreach($keyValues as $index => $kv)
<div class="key-value-pair">
<input name="keyValues[{{ $index }}][key]" value="{{ $kv['key'] }}">
<input name="keyValues[{{ $index }}][value]" value="{{ $kv['value'] }}">
</div>
@endforeach
laravelcollective/html) for form helpers and extend with JavaScript (e.g., dynamic field addition).spatie/laravel-symfony-support and adapt the bundle.FormBuilder exceptions) may be unfamiliar to Laravel teams.Illuminate\Support\Facades\Cache) and query builder.| Risk | Mitigation Strategy |
|---|---|
| Bundle abandonment | Fork the repo or rebuild functionality. |
| Symfony version conflicts | Pin versions strictly or use a bridge. |
| Poor Laravel integration | Start with a prototype; avoid monolithic adoption. |
| UI/UX inconsistencies | Use Laravel’s Blade for consistent styling. |
| Validation gaps | Extend with Laravel’s validation pipeline. |
How can I help you explore Laravel packages today?