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

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

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

Laravel Laminas Form

1.12.0(3w ago)118.9k↓42.9%2MITPHPPHP ^8.2CI passing

Since Jun 3Pushed 1w 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 3d ago

READMEChangelogDependencies (15)Versions (44)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)

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

Note

This package is not actively maintained.

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

[](#requirements)

- PHP &gt;= 8.2
- Laravel &gt;= 12.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

61

—

FairBetter than 98% of packages

Maintenance97

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 79.6% 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 ~71 days

Recently: every ~402 days

Total

42

Last Release

23d 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 (90 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)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![smilingcheater](https://avatars.githubusercontent.com/u/618672?v=4)](https://github.com/smilingcheater "smilingcheater (1 commits)")

---

Tags

laravelformlaminas-form

###  Code Quality

Code StyleLaravel Pint

### 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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[neilime/twbs-helper-module

Laminas (formerly Zend Framework) module for easy integration of Twitter Bootstrap

21106.1k](/packages/neilime-twbs-helper-module)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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