Avatar

Formello: Laravel Package for Creating Forms Quickly & Easily

Get to know Formello, the Laravel package that makes form creation super fast and hassle-free.

Rama Can

Formello: Laravel Package for Creating Forms Quickly & Easily

Formello: A Practical Solution for Creating Forms in Laravel 🚀

If you frequently code in Laravel, you’ve probably experienced the hassle of creating repetitive forms. From creating input fields, validation, error handling, to rendering in Blade. Well, now there’s Formello, a Laravel package specifically designed to simplify developers’ lives when creating forms.

Formello offers the perfect compromise::

  • Simpler than complex form libraries.
  • Lighter than full-featured admin panels such as Nova or Filament.

So, if you need to create forms quickly but still want them to be flexible and easy to manage, Formello could be your new best friend.


✨ Key Features of Formello

  • Easy-to-use form definition using Laravel classes.
  • Automatic rendering directly to Blade.
  • Supports various fields: text, textarea, select, select2, radio, checkbox, toggle, date, datetime, upload, hidden, and custom widgets.
  • Automatic error handling (no need to create manually).
  • Form validation is directly integrated.
  • Styling support: Bootstrap 5 (Tailwind CSS coming soon).

With this feature, you can focus on the logic of the application without having to copy and paste boilerplate forms.


🛠️ Formello Installation

Installation is very easy. Install the package via composer:

bash

Publish your assets:

bash

To automatically update assets every time composer updates, just add this to composer.json:

json

😎 How to Use Formello in Laravel

Alright, let’s get hands-on with Formello. Here’s how you can start using it in your Laravel project.

1. Create a Form Class

First, create a form class that extends Metalogico\Formello\Formello.
Here’s a simple example for a ProductForm:

php

⚠️ Note: Make sure these fields are added to your model’s $fillable array, otherwise Formello won’t render them.

php

2. Generate a Form Automatically with Artisan

Too lazy to write everything manually? Formello can generate the form for you based on your model’s fillable fields:

bash

This command will create a skeleton form based on the fillable fields in the model. It saves a lot of time, doesn't it?


3. Rendering the Form in Controller & Blade

Controller – Create Form (New Record)

php

Controller – Edit Form (Update Record)

php

Blade Template – Render the Form

php

If you only want to render the fields without the <form> tag:

php

4. Conditional Logic (Different for Create & Edit)

Formello provides handy methods isCreating() and isEditing() to adapt your form fields dynamically.

php

This way, the password field is required when creating a new record, but optional when editing.


🎉 Done! With these steps, you can create Laravel forms faster, cleaner, and more flexibly using Formello.

Currently supports Bootstrap 5, and for Tailwind CSS enthusiasts, just wait a little longer it's coming soon!

👉 For more information, see the source code on Github.

Newsletter

Join for information and practical tips delivered to your inbox 🔥

No spam, Unsubscribe anytime, We respect your privacy.

Loading...

© 2025 Rama Can. All rights reserved.