PHPackages                             revolution/laravel-zend-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. [Templating &amp; Views](/categories/templating)
4. /
5. revolution/laravel-zend-form

Abandoned → [revolution/laravel-laminas-form](/?search=revolution%2Flaravel-laminas-form)ArchivedLibrary[Templating &amp; Views](/categories/templating)

revolution/laravel-zend-form
============================

Laravel Zend Form

1.3.0(5y ago)21.7kMITPHPPHP ^7.1.3||^8.0

Since Jun 3Pushed 5y ago1 watchersCompare

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

READMEChangelogDependencies (10)Versions (26)Used By (0)

Laravel Zend Form
=================

[](#laravel-zend-form)

[![Build Status](https://camo.githubusercontent.com/b23382e1461296c7678f70f79fa4ed3f1b1e4e3a93ea5b9a620dec3f97ba287b/68747470733a2f2f7472617669732d63692e636f6d2f6b617761782f6c61726176656c2d7a656e642d666f726d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/kawax/laravel-zend-form)[![Maintainability](https://camo.githubusercontent.com/d05ec639594f41664cc713d7f60ff579e878a7f45fd63af450f4cc9d34d7af67/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f37626333616238313466626432343534623665632f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/kawax/laravel-zend-form/maintainability)[![Test Coverage](https://camo.githubusercontent.com/ca1832f2901c21a147a248c0e45de74535d3a07715fd545c1c97c8bfc35308e0/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f37626333616238313466626432343534623665632f746573745f636f766572616765)](https://codeclimate.com/github/kawax/laravel-zend-form/test_coverage)

[![Laravel Zend Form](screenshot.png)](screenshot.png)

Laminas
-------

[](#laminas)

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

[](#requirements)

- PHP &gt;= 7.1
- Laravel &gt;= 5.5

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

[](#installation)

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

```

### Suggest from ZendForm

[](#suggest-from-zendform)

```
        "zendframework/zend-captcha": "^2.7.1, required for using CAPTCHA form elements",
        "zendframework/zend-code": "^2.6 || ^3.0, required to use zend-form annotations support",
        "zendframework/zend-eventmanager": "^2.6.2 || ^3.0, reuired for zend-form annotations support",
        "zendframework/zendservice-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\ZendForm\Form as ZendForm;
use Zend\Form\Element;

class SampleForm extends ZendForm
{
    /**
     * 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' => 'form-group 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'    => 'form-group 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 ZendForm'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 Zend's ViewHelper by magic method.

See

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

[](#viewhelper-render)

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

Validation
----------

[](#validation)

Use Laravel's FormRequest.

LICENSE
-------

[](#license)

MIT
Copyright kawax

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity78

Established project with proven stability

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 ~34 days

Recently: every ~59 days

Total

25

Last Release

2085d ago

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

1.1.0PHP &gt;=7.1.3

1.1.11PHP ^7.1.3||^8.0

### Community

Maintainers

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

---

Tags

laravelformzend-form

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravie/html

HTML and Form Builders for the Laravel Framework

36184.6k4](/packages/laravie-html)[webup/laravel-form

A Laravel package to help build forms.

147.2k1](/packages/webup-laravel-form)[tomjamon/laravel-custom-html

Custom HTML generator for Laravel (Based on LaravelCollective HTML)

1018.6k](/packages/tomjamon-laravel-custom-html)[zfbase/zend1-bootstrap3

Twitter Bootstrap v.3 Forms for Zend Framework v.1

1455.7k2](/packages/zfbase-zend1-bootstrap3)

PHPackages © 2026

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