PHPackages                             mrself/ya-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. mrself/ya-form

ActiveLibrary[Templating &amp; Views](/categories/templating)

mrself/ya-form
==============

Generate html form in laravel easy

1.0.5(10y ago)038MITPHP

Since Nov 20Pushed 10y ago1 watchersCompare

[ Source](https://github.com/mrself/ya-form)[ Packagist](https://packagist.org/packages/mrself/ya-form)[ RSS](/packages/mrself-ya-form/feed)WikiDiscussions master Synced 2mo ago

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

Package for Laravel 5.0.0 for easy making html forms
====================================================

[](#package-for-laravel-500-for-easy-making-html-forms)

Why do you need this package?
-----------------------------

[](#why-do-you-need-this-package)

How do you create forms? Say you have articles resource and want to implements creating / editing articles. What do you do first? I can suppose that you have to create the full markup for form in `create` view and also the same form markup for `edit` view. And event if you have 5 fields it takes a lot of time to create this stuff. But I see a simplier way to do it. You define what fields do you need in array format, init package. And in when you need to show your fields you write: `$form->render();`. That's all. You have all the fields that you need.

How it works
------------

[](#how-it-works)

Well, it is more interesting. The format of the needed data is a simple array of fields in such a format:

```
[
    'name' => 'article_title',
    'type' => 'text',
    'label' => 'Title of the article'
]

```

And in the end you will have:

```

		Title of the article

```

The key here is that you have template for each type of field (textarea, select). The package goes through the array of fields and render view for each field. In the result you have the html of such rows of fields. You can change view files for row and for field.

How to install
--------------

[](#how-to-install)

Install via composer:

```
composer require mrself/ya-form

```

Add `'Mrself\YaF\YaFormServiceProvider'` to your service providers in `config/app.php`. If you want to rewrite the view files, run `php artisan vendor:publish --provider="Mrself\YaF\YaFormServiceProvider"`.

How to use
----------

[](#how-to-use)

First, create the instance:

```
    $form = \App::make('YaF');

```

And init:

```
    $form->init($seedData, $fields, $args);

```

`$seedData` is the array of values for form fields. The key is the name of field, and value of the array if the value of field. `$fields` is the array of main fields data:

```
    [
        'name' => 'article_title',
        'type' => 'text',
        'label' => 'Title of the article'
    ]

```

`$args` is the array of arguments for fields. The key is the name of field and value is the args for fields.

And in you view you can simple write: `{!! $form->render() !!}` which output all the fields. Note that does not include form opening and closing tag.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~3 days

Total

6

Last Release

3813d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9679597?v=4)[Yaroslav](/maintainers/mrself)[@mrself](https://github.com/mrself)

---

Top Contributors

[![mrself](https://avatars.githubusercontent.com/u/9679597?v=4)](https://github.com/mrself "mrself (33 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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