Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravelforms Laravel Package

michalkortas/laravelforms

Blade form components for Laravel 7–8 that generate Bootstrap-styled inputs fast, with built-in validation error support. Includes text, select, textarea, checkbox, radio, file, date/time, color, and more, with easy model binding for values.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Accelerated Form Development: Reduces boilerplate for CRUD interfaces by providing pre-built, Bootstrap-compatible form components (e.g., <x-form-text>, <x-form-select>). Ideal for rapid MVP builds or internal tools where form consistency is critical.
  • Consistent UX Across Forms: Enforces standardized styling (Bootstrap classes) and validation error handling, reducing frontend inconsistencies in multi-developer teams.
  • Laravel Ecosystem Integration: Seamlessly works with Eloquent models, validation, and Blade templates, aligning with Laravel’s philosophy of "convention over configuration." Supports complex use cases like nested model relationships (e.g., model-key="departments.id").
  • Reduced Frontend Dependencies: Eliminates the need for jQuery plugins (e.g., Select2) or custom JavaScript for basic form enhancements, simplifying maintenance and reducing bundle size.
  • Roadmap for Admin Panels: Justifies investing in Laravel-native solutions over frontend frameworks (e.g., React/Vue) for admin dashboards or B2B tools where backend logic dominates.
  • Validation-First Approach: Out-of-the-box support for Laravel validation errors (e.g., class="is-invalid") aligns with security and data integrity priorities.

When to Consider This Package

Adopt if:

  • Your project relies heavily on server-rendered forms (e.g., admin panels, settings pages, or user profiles).
  • You need Bootstrap-compatible form components without writing custom HTML/CSS.
  • Your team prioritizes PHP/Laravel-native solutions over JavaScript frameworks for form handling.
  • You’re building internal tools or B2B applications where form UX matters but isn’t the core feature.
  • You want to reduce frontend complexity by avoiding libraries like Select2, Chosen, or custom JavaScript.
  • Your Laravel app uses Eloquent models and you need to bind form inputs to model attributes (including nested relationships).
  • You’re targeting Laravel 7/8 and can’t upgrade to newer versions (package supports only these).

Look elsewhere if:

  • You need highly interactive or visual forms (e.g., drag-and-drop, image uploads, or rich text editors) → Use frontend frameworks (React, Vue) or dedicated libraries (Dropzone, Quill).
  • Your app is frontend-heavy (e.g., SPAs, PWAs) → PHP-native form libraries may feel misaligned with your tech stack.
  • You require advanced form features like:
    • Dynamic dependent selects (e.g., cascading dropdowns).
    • Real-time validation or client-side processing → Consider Livewire, Inertia.js, or Alpine.js.
    • Complex workflows (e.g., multi-step forms, conditional logic) → Evaluate FormKit or Laravel Nova.
  • Your team lacks PHP/Laravel expertise → Onboarding may introduce friction or require additional training.
  • You need custom styling beyond Bootstrap → The package enforces Bootstrap classes, limiting design flexibility.
  • You’re using Laravel 9+ → The package hasn’t been updated for newer Laravel versions (last release: 2023-09-01).

How to Pitch It (Stakeholders)

For Executives:

*"This Laravel package is a 10x faster way to build and maintain forms in our admin tools or user-facing workflows. Instead of spending weeks debating Bootstrap classes or debugging custom JavaScript for dropdowns, checkboxes, and inputs, we can generate consistent, validated forms with a single Blade component. For example:

  • Turn a clunky category picker into a polished, error-handling <x-form-select> in 5 minutes (vs. hours with custom code).
  • Reduce frontend dependencies, lowering maintenance costs and improving load times.
  • Align with our Laravel stack without adding JavaScript complexity.

Use case: Imagine rolling out a new user profile editor or admin dashboard—this package ensures forms are pixel-perfect, validated, and ready to ship without frontend bottlenecks. Perfect for internal tools where polish matters but budgets don’t."*


For Engineering Teams:

*"LaravelForms solves two key pain points:

  1. Boilerplate Hell: No more writing repetitive HTML for forms. Replace:

    <div class="form-group">
        <label>Email</label>
        <input type="email" name="email" class="form-control" value="{{ old('email') }}">
        @error('email') <span class="invalid-feedback">{{ $message }}</span> @enderror
    </div>
    

    With:

    <x-form-email label="Email" name="email" :model="$user" />
    

    Automatically handles labels, validation errors, and Bootstrap classes.

  2. Model Binding: Seamlessly syncs with Eloquent, including nested relationships:

    <x-form-select :model="$user" model-key="role.id" name="role" :options="$roles" />
    

    No manual $user->role_id checks—just declare the relationship path.

Tradeoffs:

  • Limited to Bootstrap: If you’re using Tailwind or custom CSS, you’ll need to override classes.
  • No JavaScript Magic: For advanced UX (e.g., searchable selects), you’d still need a library like Select2—but this covers 80% of use cases without the overhead.
  • Laravel 7/8 Only: Not future-proof if you’re upgrading soon.

When to Use:

  • CRUD interfaces (e.g., admin panels, user profiles).
  • Forms where consistency > customization (e.g., settings pages).
  • Projects where reducing frontend work is a priority.

Example Workflow:

  1. Install: composer require michalkortas/laravelforms.
  2. Replace <input> tags with <x-form-*> components.
  3. Profit: Faster dev cycles, fewer bugs, and no frontend dependencies for basic forms."*

For Designers/UX:

*"This package ensures forms look and behave consistently across the app by enforcing Bootstrap styling and validation patterns. Key benefits:

  • No more visual inconsistencies: Every form component uses the same classes (form-group, form-control), so checkboxes, selects, and text inputs match your design system.
  • Validation feedback: Errors are styled automatically (e.g., is-invalid classes), so users get clear feedback without custom CSS.
  • Faster iterations: Need to tweak a form? Update the Blade component instead of hunting through SCSS or JavaScript.

Limitations:

  • If you’ve customized form styles beyond Bootstrap, you’ll need to override classes.
  • For highly interactive forms (e.g., sliders, date pickers), you’ll still need additional libraries.

Pitch: ‘Let’s use this for all admin forms—it’ll save us from arguing about padding or error states while keeping everything on-brand.’"*

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
craftcms/url-validator
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony