Aire Form Builder Package for Laravel

Aire Form Builder Package for Laravel

Aire is a Laravel form builder package by Chris Morrell with features like data binding and an expressive syntax:

Aire is a modern Laravel form builder (demo) with a focus on the same expressive and beautiful code you expect from the Laravel ecosystem.

Here’s a basic demo from the project’s readme:

{{ Aire::open()->route('users.update') }}

{{ Aire::bind($user) }}

<div class="flex flex-col md:flex-row">

  {{ Aire::input('given_name', 'First/Given Name')
    ->id('given_name')
    ->autoComplete('off')
    ->groupClass('flex-1 mr-2') }}

  {{ Aire::input('family_name', 'Last/Family Name')
    ->id('family_name')
    ->autoComplete('off')
    ->groupClass('flex-1') }}

</div>

{{ Aire::email('email', 'Email Address') }}

{{ Aire::submit('Update User') }}

{{ Aire::close() }}

I like data binding features that typically come with form builder libraries which make it simple to map a model to form inputs. The data binding also takes care of populating form inputs with old() data when validation errors occur.

The Aire package includes Eloquent model binding along with the ability to bind custom array/object data:

// Bind Eloquent models
Aire::bind(User::find(1));

// Bind an array
Aire::bind(['given_name' => 'Chris']);

// Bind any object
Aire::bind((object) ['given_name' => 'Chris']);

If data binding was not enough, this package also automatically picks up any errors and applies error classes and shows error messages with the associated input. Also, you have access to a summary of error messages with the following methods:

// Print "There are X errors on this page that you must fix before continuing."
{{ Aire::summary() }}

// Also include an itemized list of errors
{{ Aire::summary()->verbose() }}

To get started with the Aire Form Builder package, head over to the Documentation & Demos. You can view the source code on GitHub at glhd/aire.


Filed in: News / packages


Newsletter

Join the weekly newsletter and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

Experienced PHP Developer
Wilmington, NC
Queensboro Shirt Company
Senior Laravel developer
Netherlands, Rotterdam
Pionect
Senior Laravel Engineer
Remote okay (must already live in USA)
Hawthorne Effect
Senior Software Engineer (Remote - Contract)
Remote
Koodi Systems
PHP Developer
Pittsburgh / Remote
Sequoia Waste Solutions
Software Developer
Eindhoven
Simac IDS
Application Developer Level II (CakePHP / MySql / Vue.js)
Lancaster, PA
Harbor Compliance