PHPackages                             metalogico/laravel-formello - 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. [Templating &amp; Views](/categories/templating)
4. /
5. metalogico/laravel-formello

ActiveLibrary[Templating &amp; Views](/categories/templating)

metalogico/laravel-formello
===========================

A Laravel package for generating Bootstrap 5 and Tailwind CSS 4 forms based on models

v2.1.0(3mo ago)1012.2k—2.8%4MITJavaScriptPHP ^8.1

Since Jul 21Pushed 3mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (4)Versions (20)Used By (0)

[![image](https://private-user-images.githubusercontent.com/7287030/469764260-5f54ca42-1aa9-44a5-92b0-79862d4f3f27.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzIxNTI2ODYsIm5iZiI6MTc3MjE1MjM4NiwicGF0aCI6Ii83Mjg3MDMwLzQ2OTc2NDI2MC01ZjU0Y2E0Mi0xYWE5LTQ0YTUtOTJiMC03OTg2MmQ0ZjNmMjcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDIyNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAyMjdUMDAzMzA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2YwNjE2YmQ5YWM5M2Q2MjE1YTY1ZmI4NDAxOGU3ZDRhMmM2YWQzMDU5ZDE3NjJiZTRkOWFjMzNmOWE0ZTc0YSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Jz8Ovxpj4W_kp3JWx-7tLfddj97LJn6aeSHZtGEdddc)](https://private-user-images.githubusercontent.com/7287030/469764260-5f54ca42-1aa9-44a5-92b0-79862d4f3f27.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzIxNTI2ODYsIm5iZiI6MTc3MjE1MjM4NiwicGF0aCI6Ii83Mjg3MDMwLzQ2OTc2NDI2MC01ZjU0Y2E0Mi0xYWE5LTQ0YTUtOTJiMC03OTg2MmQ0ZjNmMjcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDIyNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAyMjdUMDAzMzA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2YwNjE2YmQ5YWM5M2Q2MjE1YTY1ZmI4NDAxOGU3ZDRhMmM2YWQzMDU5ZDE3NjJiZTRkOWFjMzNmOWE0ZTc0YSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Jz8Ovxpj4W_kp3JWx-7tLfddj97LJn6aeSHZtGEdddc)

Formello
========

[](#formello)

A Laravel package for generating Bootstrap 5 and Tailwind CSS 4 forms based on models. Laravel 11+

Formello is a comprehensive form generation and handling tool for Laravel applications, inspired by Django forms.

[![SCR-20250730-kida](https://private-user-images.githubusercontent.com/7287030/472403569-dbc897c6-2d1d-40f7-8d3f-14bed9e8868a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzIxNTI2ODYsIm5iZiI6MTc3MjE1MjM4NiwicGF0aCI6Ii83Mjg3MDMwLzQ3MjQwMzU2OS1kYmM4OTdjNi0yZDFkLTQwZjctOGQzZi0xNGJlZDllODg2OGEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDIyNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAyMjdUMDAzMzA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTI2YTljZmIyMTMzZjRkMDkzYzU0NmVhYTMzMTU4N2RmNzk2Yzk4OTJjY2ZhYWFlM2FiNTk2ZmNkMWFlYTQwYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ._M3pp0_BzTZ9q9_otQ20ZJbe8I0ywBDHYv6Fi5dMS5U)](https://private-user-images.githubusercontent.com/7287030/472403569-dbc897c6-2d1d-40f7-8d3f-14bed9e8868a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzIxNTI2ODYsIm5iZiI6MTc3MjE1MjM4NiwicGF0aCI6Ii83Mjg3MDMwLzQ3MjQwMzU2OS1kYmM4OTdjNi0yZDFkLTQwZjctOGQzZi0xNGJlZDllODg2OGEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDIyNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAyMjdUMDAzMzA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTI2YTljZmIyMTMzZjRkMDkzYzU0NmVhYTMzMTU4N2RmNzk2Yzk4OTJjY2ZhYWFlM2FiNTk2ZmNkMWFlYTQwYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ._M3pp0_BzTZ9q9_otQ20ZJbe8I0ywBDHYv6Fi5dMS5U)🎉 Motivation
------------

[](#-motivation)

The Laravel ecosystem offers powerful tools for building applications, from full-featured admin panels like Nova and Filament to complex form-handling libraries. However, I felt there was a need for a tool that sits in the "sweet spot" between these solutions.

Formello was created for developers who need to generate forms quickly without the overhead of a complete admin panel, but who also want a simpler, more intuitive API than more complex form libraries. It's designed to automate the repetitive aspects of form creation while giving you full control over the final output.

Currently, Formello ships with built-in support for **Bootstrap 5** and **Tailwind CSS 4**.

If you use this project, please consider giving it a ⭐.

✨ Features
----------

[](#-features)

- **Fluent field builder** with `FormelloField::make()` API
- **Reactive system** for field interdependencies (client-side JS and/or server-side PHP callbacks)
- Automatic form rendering with **Bootstrap 5** and **Tailwind CSS 4**
- Rich set of built-in widgets:
    - **Text**, **Textarea**, **Hidden**
    - **Select** (with multiple), **TomSelect** (AJAX, search, dependent selects)
    - **Radio**, **Checkboxes**, **Toggle**
    - **Range**
    - **Date**, **DateTime** (Flatpickr with Italian localization)
    - **Mask** (IMask.js input masking)
    - **Color**, **ColorSwatch** (Pickr nano)
    - **Wysiwyg** (Jodit Editor)
    - **Upload**
    - **Separator**
- Customizable and extensible widgets
- Modular asset management (disable libraries your theme already includes)
- Automatic error handling and display
- Artisan scaffolding command

⚠️ Upgrading to v2.x
--------------------

[](#️-upgrading-to-v2x)

Versions 2.0 and 2.1 introduce **breaking changes** from the 1.x series.

### Breaking changes in v2.0

[](#breaking-changes-in-v20)

- **Fluent field builder**: `fields()` now returns `FormelloField[]` instead of associative arrays
- **Select2 removed**: use `TomSelectWidget` instead. `HasSelect2Widget` trait replaced by `HasTomSelectWidget`
- **jQuery removed**: no longer a dependency
- **Widget rename**: `'boolean'` is now `'toggle'`
- **Tailwind CSS 4**: full widget support added

### New in v2.1

[](#new-in-v21)

- **Reactive System**: callback-based field interdependencies with `reactive.client` (JS) and `reactive.server` (PHP)

### Migration from v1.x

[](#migration-from-v1x)

```
// Before (v1.x)
protected function fields(): array
{
    return [
        'name' => [
            'label' => 'Name',
            'widget' => 'text',
        ],
    ];
}

// After (v2.x)
use Metalogico\Formello\FormelloField;

protected function fields(): array
{
    return [
        FormelloField::make('name')->label('Name')->widget('text'),
    ];
}
```

**After upgrading, republish the assets:**

```
php artisan vendor:publish --tag=formello-assets --force
php artisan vendor:publish --tag=formello-config --force
```

🛠️ Installation
---------------

[](#️-installation)

1. Install the package via Composer:

```
composer require metalogico/laravel-formello
```

2. Publish the assets:

```
php artisan vendor:publish --tag=formello-assets
```

3. (Optional) Auto-publish assets on update

To ensure that Formello's assets are automatically updated every time you run `composer update`, you can add a command to the `post-update-cmd` script in your project's `composer.json` file.

```
"scripts": {
    "post-update-cmd": [
        "@php artisan vendor:publish --tag=formello-assets --force"
    ]
}
```

😎 How to use
------------

[](#-how-to-use)

### Creating a Form

[](#creating-a-form)

Create a new form class that extends `Metalogico\Formello\Formello`. Fields are defined using the fluent `FormelloField` builder.

```
