Weave 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

Aire Laravel Package

glhd/aire

Aire is a modern, fluent form builder for Laravel. Define fields and layouts in PHP or Blade, bind models, surface validation errors, and render clean, accessible HTML forms through a simple, component-based API.

View on GitHub
Deep Wiki
Context7

Getting Started

Aire is Glide's server-rendered form builder for Laravel — you compose forms in PHP with a fluent API and echo them in Blade, instead of hand-writing <input> markup and re-implementing old-input/error repopulation on every form.

  1. Install and publish config
    composer require glhd/aire
    php artisan vendor:publish --tag=aire-config
    
  2. Set your CSS framework in config/aire.php (tailwind, bootstrap-4, bootstrap-5, or your own class map). This single setting decides the classes every element emits — get it right before you build anything, because it drives the markup contract your CSS relies on.
  3. Render your first form in a Blade view:
    {{ Aire::open()->post()->route('posts.store') }}
    
    {{ Aire::input('title', 'Title') }}
    {{ Aire::textarea('body', 'Body') }}
    {{ Aire::submit('Save') }}
    
    {{ Aire::close() }}
    

Where to look first: config/aire.php (framework + class defaults), then the published views if you want to change markup, then the Aire facade for the element list. Confirm exact method signatures against the README — the fluent surface is broad and helper names occasionally differ from what you'd guess.

Best first use case: a standard create form on a resourceful controller. You immediately get old-input repopulation and validation error display for free, which is the main reason to adopt the package at all.

Implementation Patterns

Model binding instead of manual old() juggling. Bind the model once and let Aire resolve values:

{{ Aire::open()->bind($post)->patch()->route('posts.update', $post) }}

For edit forms this removes the old('title', $post->title) noise from every field. Keep ->value() for genuinely computed fields where no model attribute exists.

Groups for repeated field anatomy. Aire::group('Title', Aire::input('title')) (or the equivalent wrapper) gives you label + control + error + help text in one unit. Standardise on groups early; retrofitting them across a large app is tedious.

Config as the styling contract. Do not sprinkle classes onto individual elements. Edit the class map in config/aire.php once so brand-wide changes (border radius, error colour, spacing) propagate to every form. Reserve per-element ->class() for true one-offs.

Per-form framework override when a legacy section of the app still uses Bootstrap while new screens use Tailwind — set the framework at form open rather than maintaining two config files.

Custom elements via macros. If you build the same composite field more than twice (e.g. a currency input with a prefix), register an Aire::macro() in a service provider so the markup stays consistent and testable.

Integration tips:

  • Aire pairs naturally with standard Laravel validation — flash errors as usual and the elements pick them up. No extra wiring.
  • Wrap forms in a Blade component (<x-form-card>) so layout chrome stays separate from the Aire calls.
  • For Livewire/Inertia apps the value is limited: Aire emits static server HTML, so lean on it for classic Blade CRUD and skip it for SPA-style flows.

Gotchas and Tips

Version ceiling matters more than usual here. 2.16.0 is a compatibility release that adds Laravel 13 support; there are no API changes. If you're on Laravel 13 you must be on ^2.16; if you're on Laravel 12 or below, 2.15.x is functionally identical, so there's no reason to rush the bump. Pin accordingly in composer.json and let CI catch the framework matrix.

Config caching. config/aire.php edits silently do nothing until you run php artisan config:cache (or clear it in local dev). This is the single most common "my classes aren't applying" cause.

Publish tags are separate. aire-config and aire-views are distinct. Editing the config assumes the config is published; if you never published it you're editing vendor files that the next composer update will overwrite.

Escape with {{ }}, never {!! !!}. The element objects stringify to fully-formed HTML with attribute values already escaped. Rendering them raw re-opens attribute-injection holes on user-supplied values.

Old input vs. bound values. Aire generally prefers flashed old input over the bound model after a failed validation — which is what you want, but it means a bound model's value can appear to "not stick" in tests where no session is present. Assert against the rendered HTML rather than the model in those cases.

Unknown framework keys fail quietly. A typo in the framework name falls back to unstyled markup with no exception. If classes are missing entirely, check that string first, before you go hunting through views.

Debugging a stubborn field: cast the element to string and inspect the output — dump((string) Aire::input('title')) — rather than reading through the class map by eye. Attribute merging order (defaults → config → fluent calls) is the usual source of surprise.

Extension points to know: macros (composite fields), published views (markup), and the class map (styling). Anything beyond those three is probably a sign you should be writing plain HTML for that specific widget.

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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource