PHPackages                             revolution/laravel-laminas-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. revolution/laravel-laminas-form

ActiveLibrary

revolution/laravel-laminas-form
===============================

Laravel Laminas Form

1.11.0(1y ago)118.1k↓40%2MITPHPPHP ^8.2CI passing

Since Jun 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/kawax/laravel-laminas-form)[ Packagist](https://packagist.org/packages/revolution/laravel-laminas-form)[ RSS](/packages/revolution-laravel-laminas-form/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (43)Used By (0)

Laravel Laminas Form
====================

[](#laravel-laminas-form)

[![tests](https://github.com/kawax/laravel-laminas-form/actions/workflows/tests.yml/badge.svg)](https://github.com/kawax/laravel-laminas-form/actions/workflows/tests.yml)[![Maintainability](https://camo.githubusercontent.com/e46023f23f963b8108167d3896b4a6b837edd5baa259bc77f7b5cae2f7f0e6e7/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f32313636366362386563353635613233643932632f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/kawax/laravel-laminas-form/maintainability)[![Test Coverage](https://camo.githubusercontent.com/63bb2e8f370c58aca9afcd84c9eba62ca6a57cf734536cad0dcda0cec7bb35c7/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f32313636366362386563353635613233643932632f746573745f636f766572616765)](https://codeclimate.com/github/kawax/laravel-laminas-form/test_coverage)

[![Laravel Laminas Form](screenshot_bs5.png)](screenshot_bs5.png)

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- Laravel &gt;= 11.0

Versioning
----------

[](#versioning)

- Basic : semver
- Drop old PHP or Laravel version : `+0.1`. composer should handle it well.
- Support only latest major version (`master` branch), but you can PR to old branches.

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

[](#installation)

```
composer require revolution/laravel-laminas-form

```

### Suggest from LaminasForm

[](#suggest-from-laminasform)

```
        "laminas/laminas-captcha": "^2.7.1, required for using CAPTCHA form elements",
        "laminas/laminas-code": "^2.6 || ^3.0, required to use laminas-form annotations support",
        "laminas/laminas-eventmanager": "^2.6.2 || ^3.0, reuired for laminas-form annotations support",
        "laminas/laminas-recaptcha": "in order to use the ReCaptcha form element"
```

Demo
----

[](#demo)

Artisan command
---------------

[](#artisan-command)

```
php artisan make:form SampleForm

```

app/Http/Forms/SampleForm.php

Form class
----------

[](#form-class)

```
namespace App\Http\Forms;

use Revolution\LaminasForm\Form;
use Laminas\Form\Element;

class SampleForm extends Form
{
    /**
     * Create a new form.
     *
     * @param null|string $name
     *
     * @return void
     */
    public function __construct($name = null)
    {
        parent::__construct($name);

        $this->setAttributes([
            'action' => url('/'),
            'method' => 'post',
        ]);

        $name = new Element\Text('name');
        $name->setAttributes([
            'id'    => 'name',
            'class' => 'form-control',
            'value' => old('name'),
        ]);
        $name->setLabel('Your name');
        $name->setLabelAttributes([
            'class' => 'col-sm-2 col-form-label',
        ]);
        $name->setOptions([
            'wrapper-class' => 'mb-3 row',
            'element-class' => 'col-sm-10',
        ]);

        $this->add($name);

        $this->add([
            'type'       => Element\Email::class,
            'name'       => 'email',
            'attributes' => [
                'id'    => 'email',
                'class' => 'form-control',
                'value' => old('email'),
            ],
            'options'    => [
                'label'            => 'Your email address',
                'label_attributes' => [
                    'class' => 'col-sm-2 col-form-label',
                ],
                'wrapper-class'    => 'mb-3 row',
                'element-class'    => 'col-sm-10',
            ],
        ]);

        $this->add([
            'type'       => Element\Hidden::class,
            'name'       => '_token',
            'attributes' => [
                'value' => csrf_token(),
            ],
        ]);

        $this->add([
            'name'       => 'send',
            'type'       => 'Submit',
            'attributes' => [
                'value' => 'Submit',
                'class' => 'btn btn-primary',
            ],
        ]);
    }
}
```

Controller
----------

[](#controller)

```
use App\Http\Forms\SampleForm;

    public function __invoke()
    {
        $form = new SampleForm();

        return view('form')->with(compact('form'));
    }
```

```
use App\Http\Forms\SampleForm;

    public function __invoke(SampleForm $form)
    {
        return view('form')->with(compact('form'));
    }
```

View
----

[](#view)

### Simple render

[](#simple-render)

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

Same as LaminasForm's `echo $this->form($form);`

### Detail render

[](#detail-render)

```
@php
    $form->prepare();
@endphp

{!! $form->form()->openTag($form) !!}

{{ csrf_field() }}

    {!! $form->get('name')->getLabel()  !!}

        {!! $form->formInput($form->get('name')) !!}

    {!! $form->get('email')->getLabel()  !!}

        {!! $form->formInput($form->get('email')) !!}

        {!! $form->formSubmit($form->get('send')) !!}

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

Form object can call Laminas's ViewHelper by magic method.

See

ViewHelper render
-----------------

[](#viewhelper-render)

```
{{ $form->render('bootstrap5horizon') }}
```

Validation
----------

[](#validation)

Use Laravel's FormRequest.

LICENSE
-------

[](#license)

MIT
Copyright kawax

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance46

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 80% 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 ~62 days

Recently: every ~306 days

Total

41

Last Release

405d ago

PHP version history (9 changes)1.0.0PHP &gt;=7.0.0

1.1.0PHP &gt;=7.1.3

1.2.0PHP ^7.2

1.2.1PHP ^7.2||^8.0

1.5.0PHP ^7.3||^8.0

1.8.0PHP ^7.4||^8.0

1.9.0PHP ^8.0

1.10.0PHP ^8.1

1.11.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/77618633?v=4)[Revolution](/maintainers/revolution)[@Revolution](https://github.com/Revolution)

---

Top Contributors

[![kawax](https://avatars.githubusercontent.com/u/1502086?v=4)](https://github.com/kawax "kawax (88 commits)")[![N3XT0R](https://avatars.githubusercontent.com/u/1297846?v=4)](https://github.com/N3XT0R "N3XT0R (18 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (3 commits)")[![smilingcheater](https://avatars.githubusercontent.com/u/618672?v=4)](https://github.com/smilingcheater "smilingcheater (1 commits)")

---

Tags

laravelformlaminas-form

### Embed Badge

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

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

###  Alternatives

[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[anahkiasen/former

A powerful form builder

1.4k1.4M14](/packages/anahkiasen-former)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[barryvdh/laravel-form-bridge

This packages integrates Symfony Form Component in Laravel.

163354.8k1](/packages/barryvdh-laravel-form-bridge)[webup/laravel-form

A Laravel package to help build forms.

147.2k1](/packages/webup-laravel-form)

PHPackages © 2026

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