PHPackages                             bewarhizirvan/laravel-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bewarhizirvan/laravel-form

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bewarhizirvan/laravel-form
==========================

A Form generator for Laravel

0.92(12mo ago)11001MITPHPPHP ^7.1|^7.4|^8.0|^8.1|^8.2|^8.3|^8.4CI failing

Since Oct 8Pushed 12mo agoCompare

[ Source](https://github.com/bewarhizirvan/laravel-form)[ Packagist](https://packagist.org/packages/bewarhizirvan/laravel-form)[ Docs](https://github.com/bewarhizirvan/laravel-form)[ RSS](/packages/bewarhizirvan-laravel-form/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (1)

LaravelForm
===========

[](#laravelform)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fa8041f691685df8a60491dd9a3b5f5f3b6ccf01b8e2974bf27111fa63fd4cd6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626577617268697a697276616e2f6c61726176656c2d666f726d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bewarhizirvan/laravel-form)[![Total Downloads](https://camo.githubusercontent.com/bdab439718e83a1802768c7f7c4639e7c51b22f500cfeafc82af4c3c38f55674/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626577617268697a697276616e2f6c61726176656c2d666f726d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bewarhizirvan/laravel-form)[![Build Status](https://camo.githubusercontent.com/8bf5f3b6f5028f2a982631c0f2ba189665f2b99cfbf2ecad8c3dbfb4f19056a1/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f626577617268697a697276616e2f6c61726176656c2d666f726d2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/bewarhizirvan/laravel-form)[![StyleCI](https://camo.githubusercontent.com/cb13a877afd1dbe223c631789c3f922d3ace958fdb334a9cce9b26afefbc2ebd/68747470733a2f2f7374796c6563692e696f2f7265706f732f31323334353637382f736869656c64)](https://styleci.io/repos/12345678)

This is where your description should go. Take a look at [contributing.md](contributing.md) to see a to do list.

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

[](#installation)

Via Composer

```
$ composer require bewarhizirvan/laravel-form
```

Usage
-----

[](#usage)

For initiating new form

```
$form = new \BewarHizirvan\LaravelForm\LaravelForm($parameters);
```

$parameters must be an array and is optional, all keys are optional

> title : Form Title
> name : Form name
> method : Form method { get, post (default), put, patch } class : Form class
> role : Form role
> dir : Form direction { right, left (default) }
> id : Form id
> file : if you set a value to it , the Form will have enctype="multipart/form-data"
> submit : Form submit button title, if you set it to 'none' it will be removed
> back\_url : Form Back button URL, if you set it to 'none' it will be removed

For form action One of these you can use {default is ''}

> url : Full URL
> route : Route { only route string or array Laravel Style }
> action : Action { only action string or array Laravel Style }

### Functions

[](#functions)

```
$form->addText($name = null, $value = '', $attributes = [], $label = null, $label_attributes = [], $div_attributes = [])
$form->addFile($name = null, $value = '', $attributes = [], $label = null, $label_attributes = [], $div_attributes = [])
$form->addButton($label = '', $attributes = [])
$form->addHidden($name = null, $value = '', $attributes = [])
$form->addSelect($name= null, $options = [], $value='',$attributes = [],$label=null, $label_attributes = [], $div_attributes = [])
$form->addTextArea($name = null, $value = '', $attributes = [], $label = null, $label_attributes = [], $div_attributes = [])
$form->addCheckbox($name = null, $value = 1, $checked = false, $attributes = [], $label = null, $label_attributes = [], $div_attributes = [])
$form->addCheckboxGroup($name = null, $checkboxes = [], $checked_list = [], $attributes = [], $label = null, $label_attributes = [], $div_attributes = [])
$form->addRadioGroup($name = null, $radios = [], $checked = '', $attributes = [], $label = null, $label_attributes = [], $div_attributes = [])
$form->addTable($label = '', $table_data = [], $label_attributes = [], $table_attributes = [], $thead_attributes = [], $tbody_attributes = [], $tfoot_attributes = [], $div_attributes = [])
```

> For all function if $label = null, the the function will set $label = trans("db.$name")

For addTable function $table\_data will be
==========================================

[](#for-addtable-function-table_data-will-be)

```
$table_data = [
'names' => [],
'inputs' => [],
'sums' => [],
'buttons' => [],
];
```

### When finished do bellow

[](#when-finished-do-bellow)

```
$form = $form->render();
```

> the above step will generate an html code

### Example form

[](#example-form)

```
$form = new \BewarHizirvan\LaravelForm\LaravelForm($parameters);
$form->addText('email');
$form->addText('name');
$form->addText('password', '', ['type' => 'password']);
$form = $form ->render();
```

### Static Function

[](#static-function)

```
\BewarHizirvan\LaravelForm\LaravelForm::redirect($route = '/');
```

> The above function will check the $request for back\_url, if it is set it will redirect to it else it will redirect to the provided route

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Credits
-------

[](#credits)

- [Bewar Hizirvan](https://github.com/bewarhizirvan)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance50

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~840 days

Total

3

Last Release

362d ago

PHP version history (3 changes)0.9PHP ^7.1.3

0.91PHP ^7.1|^7.4|^8.0|^8.1.0

0.92PHP ^7.1|^7.4|^8.0|^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/d63271012b2af3e25a5ec79b8fb257e46f0cad30f77728bf68273b77ecee13e4?d=identicon)[bewarhizirvan](/maintainers/bewarhizirvan)

---

Top Contributors

[![bewarhizirvan](https://avatars.githubusercontent.com/u/61181832?v=4)](https://github.com/bewarhizirvan "bewarhizirvan (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

laravelLaravelForm

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[xefi/faker-php-laravel

Faker php integration with laravel

1915.1k](/packages/xefi-faker-php-laravel)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

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