PHPackages                             lubart/form - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. lubart/form

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

lubart/form
===========

Helps to build a standard form with any amount of elements, specify their values, labels or specific parameters

00PHP

Since Oct 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/vdLubart/form)[ Packagist](https://packagist.org/packages/lubart/form)[ RSS](/packages/lubart-form/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Form Builder
====================

[](#laravel-form-builder)

Package helps to build object-oriented structure for web form. It gives more control under the form data from the Controller side and makes View blade files more cleaner and readable. Within package and be created different types of web form elements, developer has full control over each element and can specify label, name, value, class and any other custom parameters. Additionally form elements can be combined in the group with full control over this block.

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

[](#installation)

This package is private and stored only on the internal server. To reach this server you should add to your `composer.json` following block:

```
"repositories": [{
  "type": "composer",
  "url": "https://packages.home"
}]

```

To install package you can run following command from the terminal:

```
composer require lubart/form
```

Composer will ask login and password to authorize on the  server.

If you are using `Laravel v5.5` or higher, package will be automatically recognized and no action is needed, for `Laravel versions v5.1 - v5.4` package should be additionally registered in the `providers` section in the `config/app.php` file:

```
...
'provider' => [
    ...
    \Lubart\Form\FormServiceProvider::class,
    ...
]
...
```

Usage
-----

[](#usage)

After installation new form can be created in any class as follow:

```
// IndexController.php

use Lubart\Form\Form;
use Lubart\Form\FormElement;
use Lubart\Form\FormGroup;

...

public functoin form(){
    $form = new Form();

    $form->add(FormElement::text(['name'=>'login', 'label'=>'Login']));

    // or alternatively
    $passwordElement = FormElement::password(['name'=>'password']);
    $passwordElement->setLabel('Password')
        ->obligatory();

    $form->add($passwordElement);

    return view('form')->with(['form'=>$form]);
}
```

and then in the view file:

```
{!! $form->render() !!}
```

### View Customization

[](#view-customization)

Package generates form elements based on `laravelcollective/html` package, but view files can be published from the package and customized to use any other web form template or clean HTML. To publish package sources run from the terminal;

```
php artisan vendor:publish --tag=lubart-form-view
```

This will publish all view files to the `/resources/views/lubart-form` directory. To use custom set of the view files, change form view environment:

```
$form = new Form();

$form->setView('partial.form');
```

In that example main form blade file should be found at `resources/views/partial/form.blade.php`

### Styles publishing

[](#styles-publishing)

Package styles can be published from the package as follow:

```
php artisan vendor:publish --tag=lubart-form-style
```

This will publish compiled `lubart-form_styles.css` CSS file to the `/public/css` directory and SASS project to the `/resources/sass/lubart-form` directory.

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/76656626f470c2428610e0463e475d331edfa08695f230d0189f670829b7ded6?d=identicon)[lubart](/maintainers/lubart)

---

Top Contributors

[![vdLubart](https://avatars.githubusercontent.com/u/29564355?v=4)](https://github.com/vdLubart "vdLubart (11 commits)")

### Embed Badge

![Health badge](/badges/lubart-form/health.svg)

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

###  Alternatives

[toplan/laravel-sms

A mobile phone number validation solution based on laravel

83580.2k2](/packages/toplan-laravel-sms)[hyperf/validation

hyperf validation

122.2M213](/packages/hyperf-validation)[udokmeci/yii2-phone-validator

Modern Yii2 Phone validator wrapper on top of PhoneNumberUtil library also used by Android devices

36227.5k1](/packages/udokmeci-yii2-phone-validator)[snowcap/vat-validation

EU VAT number validation

10112.3k](/packages/snowcap-vat-validation)

PHPackages © 2026

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