protonemedia/laravel-form-components
Deprecated package providing Blade form components for Laravel (inputs, selects, checkboxes, radios) with validation, model binding, defaults, translations, and customizable vendor styling for Tailwind CSS v1/v2 and Bootstrap 4/5.
Start by installing the package via Composer and publishing its config:
composer require protonemedia/laravel-form-components
php artisan vendor:publish --provider="PavelBal\Symfony\Component\Form\FormBundle\FormBundle" --tag="form-components-config"
⚠️ Critical note: This package is deprecated (archived as of 2023-02-21) and no longer maintained. It does not support Laravel 10+, Livewire 3, or Tailwind CSS 3+. Consider using alternatives like Laravel Form Components (community-maintained fork), Jetstream + Livewire, or modern alternatives like Filament Forms.
If proceeding with legacy use:
config/form-components.php (e.g., 'framework' => 'tailwind-forms')@bind($model) blocks for model-driven forms<x-form action="{{ route('users.store') }}">
@bind($user)
<x-form-input name="name" />
<x-form-email name="email" />
<x-form-submit />
@endbind
</x-form>
@bind() to bind models to entire form sections—ideal for CRUD views (create/edit). Override bindings per-field with :bind="$otherModel" or :bind="false".@wire for wire:model-like behavior:<x-form wire:submit.prevent="submit">
@wire('debounce.300ms')
<x-form-input name="email" />
@endwire
<x-form-submit>Send</x-form-submit>
</x-form>
spatie/laravel-translatable, use the language attribute for translatable fields:<x-form-textarea name="title" language="en" placeholder="English title" />
<x-form-textarea name="title" language="nl" placeholder="Dutch title" />
<x-form-group> for inline radios/checkboxes or wrapping related fields. Wrap complex sections in custom Blade components (e.g., <x-user-details-section>) that leverage these primitives.:show-errors="false" if using custom error UI.php artisan vendor:publish --tag="form-components-views" to override templates—but be warned: future updates won’t sync.use_eloquent_date_casting in config to handle date/datetime casts properly. Without it, Carbon instances break the form.many-relation attribute for BelongsToMany relationships (e.g., <x-form-select name="tags[]" :options="$post->tags->pluck('name', 'id')" many-relation />).->withInput() on redirects.@wire) changed.Protonemedia\LaravelFormComponents\Components classes in your service provider, then binding custom implementations.old() input in tests using Request::replace() to simulate form submissions.How can I help you explore Laravel packages today?