PHPackages                             glhd/aire - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. glhd/aire

ActiveLibrary

glhd/aire
=========

Modern Laravel form builder. Remembers old input, retrieves error messages and comes with beautiful Tailwind-based markup out of the box.

2.16.0(1mo ago)545265.3k↓11.2%40[7 PRs](https://github.com/glhd/aire/pulls)6MITPHPCI passing

Since Oct 31Pushed 1mo ago6 watchersCompare

[ Source](https://github.com/glhd/aire)[ Packagist](https://packagist.org/packages/glhd/aire)[ RSS](/packages/glhd-aire/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (23)Versions (95)Used By (6)

 [ ![Build Status](https://github.com/glhd/aire/workflows/PHPUnit/badge.svg) ](https://github.com/glhd/aire/actions) [ ![Latest Stable Release](https://camo.githubusercontent.com/edf74f02234be46dc5458aae85a9425d0667ea3d6a66497c079fa7e1cf0dabec/68747470733a2f2f706f7365722e707567782e6f72672f676c68642f616972652f762f737461626c65) ](https://packagist.org/packages/glhd/aire) [ ![MIT Licensed](https://camo.githubusercontent.com/8906b4b4d06d2d2eb452dc455c704ee9460f0ab0ff02df0e3066e6131cc2aeae/68747470733a2f2f706f7365722e707567782e6f72672f676c68642f616972652f6c6963656e7365) ](./LICENSE) [ ![Follow @cmorrell.com on bsky](https://camo.githubusercontent.com/8790699596340eff27762850c822f5e8e08a379e860085e46bf69359e4d2bc18/68747470733a2f2f696d672e736869656c64732e696f2f626c7565736b792f666f6c6c6f776572732f636d6f7272656c6c2e636f6d) ](https://bsky.app/profile/cmorrell.com)

 [ ![Aire](https://camo.githubusercontent.com/572a801e55a263ed938602c4849c250fded4bc22c6aed3476cde23a85e429974/68747470733a2f2f616972657068702e636f6d2f6c6f676f2e737667) ](https://airephp.com)
===============================================================================================================================================================================================

[](#)

Aire is a modern Laravel form builder ([demo](https://airephp.com)) with a focus on the same expressive and beautiful code you expect from the Laravel ecosystem.

Basic Usage
-----------

[](#basic-usage)

The most common usage is via the `Aire` facade in your blade templates. All method calls are fluent, allowing for easy configuration of your form components:

```
{{ Aire::open()
  ->route('users.update')
  ->bind($user) }}

{{ Aire::input('given_name', 'First/Given Name')
    ->id('given_name') }}

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

{{ Aire::email('email', 'Email Address')
    ->helpText('Please use your company email address.') }}

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

{{ Aire::close() }}
```

### Blade Components

[](#blade-components)

As of Aire 2.4.0, you can also use all Aire elements as [Blade Components](https://laravel.com/docs/8.x/blade#components). The above form is identical to:

```

```

Installation
------------

[](#installation)

Install via composer with:

```
composer require glhd/aire
```

Customization
-------------

[](#customization)

Aire comes with classes that should work with the default Tailwind class names out of the box (`.bg-blue-600` etc). If you need to change the default class names for any given element, there are two different ways to go about it.

The first is to publish the `aire.php` config file via `php artisan vendor:publish --tag=aire-config`and update the `default_classes` config for the element you'd like to change:

```
return [
  'default_classes' => [
    'input' => 'text-gray-900 bg-white border rounded-sm',
  ],
];
```

The second option is to publish custom views via `php artisan vendor:publish --tag=aire-views`which gives you total control over component rendering. There's a view file for each component type (`input.blade.php` etc) as well as for component grouping. This gives you the most flexibility, but means that you have the maintain your views as Aire releases add new features or change component rendering.

Configuration
-------------

[](#configuration)

When you publish the `aire.php` config file via `php artisan vendor:publish --tag=aire-config`, there are a handful of other configuration options. The config file is fully documented, so go check it out!

Data Binding
------------

[](#data-binding)

Aire automatically binds old input to your form so that values are preserved if a validation error occurs. You can also bind data with the `bind()` method.

```
// 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']);
```

### Binding Precedence

[](#binding-precedence)

Binding is applied in the following order:

1. Values set with `value()` are applied no matter what
2. Old input is applied if available
3. Bound data is applied last

Method Spoofing &amp; Inference
-------------------------------

[](#method-spoofing--inference)

Aire will automatically add the Laravel `_method` field for forms that are not `GET` or `POST`. It will also automatically infer the intended method from the route if possible.

```
// In routes
Route::delete('/photos/{photo}', 'PhotosController@destroy')
	->name('photos.destroy');

// In your view
{{ Aire::open()->route('photos.destroy', $photo) }}
{{ Aire::close() }}
```

Will generate the resulting HTML:

```

```

Automatic CSRF Field
--------------------

[](#automatic-csrf-field)

Aire will automatically inject a CSRF token if one exists and the form is not a `GET` form. Simply enable the session and a hidden `_token` field will be injected for you.

Server-Side Validation
----------------------

[](#server-side-validation)

If you run validations on the server, Aire will pick up any errors and automatically apply error classes and show error messages within the associated input's group.

You can also include an error summary, which provides an easy way to show your users an error at the top of the page if validation failed.

```
// 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() }}
```

Client-Side Validation
----------------------

[](#client-side-validation)

Javascript validation in Aire is in its early stages. Browser testing is limited, and the Javascript code hasn't had an performance optimizations applied. That said, Aire supports automatic client-side validation—simply pass an array of rules or a `FormRequest`object and Aire will automatically apply most rules on the client side (thanks to [validatorjs](https://github.com/skaterdav85/validatorjs)!).

Laravel Version Support
-----------------------

[](#laravel-version-support)

Aire should run on Laravel 5.8.28 and higher, and PHP 7.1 and higher. Our policy is to test the last two major releases of PHP and Laravel, so support below that is not guaranteed.

Translations
------------

[](#translations)

Aire comes with support for a handful of languages (feel free to submit a PR!). If you would like to add your own translations, you can do so by publishing them with:

```
php artisan vendor:publish --tag=aire-translations
```

Under Consideration / Feature Ideas
-----------------------------------

[](#under-consideration--feature-ideas)

There are a few things that are still either in-the-works or being considered for a later release. These include:

- [Read-only plain text](http://getbootstrap.com/docs/4.1/components/forms/#readonly-plain-text)
- Cross-browser support for custom checkboxes and radio buttons via a config option
- Support for Choices.js or similar `` UI libraries
- Better handling of file inputs
- Better support for [prepending or appending content to inputs](https://getbootstrap.com/docs/4.0/components/input-group/#basic-example)

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance89

Actively maintained with recent releases

Popularity56

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 91.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~37 days

Recently: every ~96 days

Total

74

Last Release

56d ago

Major Versions

0.9.0 → 1.0.0-beta.12019-07-27

1.10.0 → 2.0.02020-04-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21592?v=4)[Chris Morrell](/maintainers/inxilpro)[@inxilpro](https://github.com/inxilpro)

---

Top Contributors

[![inxilpro](https://avatars.githubusercontent.com/u/21592?v=4)](https://github.com/inxilpro "inxilpro (381 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 commits)")[![bogdankharchenko](https://avatars.githubusercontent.com/u/32746389?v=4)](https://github.com/bogdankharchenko "bogdankharchenko (5 commits)")[![joostdebruijn](https://avatars.githubusercontent.com/u/1844089?v=4)](https://github.com/joostdebruijn "joostdebruijn (2 commits)")[![cheyner](https://avatars.githubusercontent.com/u/146845?v=4)](https://github.com/cheyner "cheyner (2 commits)")[![mohamedsabil83](https://avatars.githubusercontent.com/u/10126040?v=4)](https://github.com/mohamedsabil83 "mohamedsabil83 (2 commits)")[![laytan](https://avatars.githubusercontent.com/u/20369598?v=4)](https://github.com/laytan "laytan (1 commits)")[![minthemiddle](https://avatars.githubusercontent.com/u/1950766?v=4)](https://github.com/minthemiddle "minthemiddle (1 commits)")[![Gummibeer](https://avatars.githubusercontent.com/u/6187884?v=4)](https://github.com/Gummibeer "Gummibeer (1 commits)")[![b1nj](https://avatars.githubusercontent.com/u/1835874?v=4)](https://github.com/b1nj "b1nj (1 commits)")[![ben221199](https://avatars.githubusercontent.com/u/12856904?v=4)](https://github.com/ben221199 "ben221199 (1 commits)")[![chiiya](https://avatars.githubusercontent.com/u/15029301?v=4)](https://github.com/chiiya "chiiya (1 commits)")[![adambalint-srg](https://avatars.githubusercontent.com/u/548582?v=4)](https://github.com/adambalint-srg "adambalint-srg (1 commits)")[![Keoghan](https://avatars.githubusercontent.com/u/6714599?v=4)](https://github.com/Keoghan "Keoghan (1 commits)")

---

Tags

laraveltailwindFormsaire

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/glhd-aire/health.svg)

```
[![Health](https://phpackages.com/badges/glhd-aire/health.svg)](https://phpackages.com/packages/glhd-aire)
```

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)[laragear/poke

Keep your forms alive, avoid TokenMismatchException by gently poking your Laravel app

2211.5k](/packages/laragear-poke)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
