PHPackages                             webfox/laravel-forms - 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. webfox/laravel-forms

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

webfox/laravel-forms
====================

A Laravel form package

v1.7.7(2y ago)17153MITPHPPHP &gt;=7.1

Since Apr 5Pushed 2y ago3 watchersCompare

[ Source](https://github.com/webfox/laravel-forms)[ Packagist](https://packagist.org/packages/webfox/laravel-forms)[ RSS](/packages/webfox-laravel-forms/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (10)Dependencies (1)Versions (19)Used By (0)

Laravel Forms
=============

[](#laravel-forms)

By default the views are setup for beagle Javascript not included

Directives
----------

[](#directives)

### Form Open

[](#form-open)

```
@form(['update' => route('some-model.store', [$model]), 'model' => $model, 'files' => true, 'extra' => [...]])
@form(['store' => route('some-model.store'), 'files' => true, 'extra' => [...]])
@form(['delete' => route('some-model.delete'), 'files' => true, 'extra' => [...]])
@form(['get' => route('search.route'), 'extra' => [...]])

```

#### Notes

[](#notes)

- Using any of these methods will automatically append the **csrf \_token** and correct **route type \_method** fields.
- If a model is passed via the `'model'` key, We will use it's data to populate the form fields value.
- Anything passed via the `'extra'` array will be appended as attributes to the form.

### Form Close

[](#form-close)

```
@endform

```

#### Notes

[](#notes-1)

- The form is actually a component, which means you need to close it after you're done.
- This will also unbind the `'model'` so future forms on the same page are not affected.

### Form Field

[](#form-field)

Now we get into the fun stuff. The minimum required for a form field is a name

```
@formField(['name' => 'first_name'])

```

This will render a `type="text"` form field wrapped in a form group with the label of `First Name` and an appropriate value, Additionally this will handle displaying server validation errors.

```
@formField(['name' => 'name', 'label' => 'Your Name'])

```

This will render as above, however the label will be `Your Name`

```
@formField(['name' => 'name', 'label' => false])

```

This will render as above, however there will be no label

```
@formField(['name' => 'work_email', 'type' => 'email' ])

```

This will render a `type="email"` form field following the previous rules

```
@formField(['name' => 'role', 'options' => ['k' => 'v', 'k2' => 'v2']])

```

This will render a `select` with the given options. If no value is found for this field we will also prepend an empty `` tag

```
@formField(['name' => 'roles', 'options' => ['k' => 'v', 'k2' => 'v2'], 'extra' => ['multiple']])

```

This will render a `select` with the given options, additionally the name on the select will be `roles[]`

```
@formField(['name' => 'first_name', 'extra' => ['required', 'data-boolean', 'data-something' => 'value']])

```

This will render a field with the following additional attributes `required data-boolean data-something="value"`

Calculating Values
------------------

[](#calculating-values)

The following order of precedence is used for calculating values for a form 0. Input matching the `name` via Laravels `old($fieldName)` helper. 0. Attributes from the model provided to `@form`0. Values passed in directly e.g. `@formField(['name' => 'name', 'value' => 'John'])`.

Additionally if the final calculated value is an object and has a `getValue` method, this will be called.

### Note on *old* input and multiple forms...

[](#note-on-old-input-and-multiple-forms)

Unfortunately, there's no way to scope Laravels `old($fieldName)` helper, meaning that if one form on a page has old input, all fields on the page with the same name will be populated with the old input. This is not a limitation of this package, rather it is a limitation of Laravel's old input handling.

A note about templates, backward compatibility and support
----------------------------------------------------------

[](#a-note-about-templates-backward-compatibility-and-support)

We've open sourced this package so you can use it too, however it is primarily designed for our inhouse usage, meaning some of the templates have specific rules that require javascript from our templates to run, additionally we'll be releasing often to add new features and fixes we need, but it may break your work.

Rather than using this package directly, we suggest you fork it and maintain a copy for your organisation.

IDE Helper
----------

[](#ide-helper)

If you don't have them already, add the following to your projects `.idea/blade.xml` file so PHPstorm knows about the directives

```

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~94 days

Recently: every ~287 days

Total

17

Last Release

1082d ago

PHP version history (2 changes)v1.0.0PHP ^7.2.0

v1.7.6PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/89a3fc3149eeb34725cdbe81bee9adc4a9db23425ef3595a3a115a4f23c813ea?d=identicon)[foxbytehq](/maintainers/foxbytehq)

---

Top Contributors

[![hailwood](https://avatars.githubusercontent.com/u/709773?v=4)](https://github.com/hailwood "hailwood (9 commits)")[![SuryaWebfox](https://avatars.githubusercontent.com/u/53416793?v=4)](https://github.com/SuryaWebfox "SuryaWebfox (5 commits)")[![TcFxGt4AGE](https://avatars.githubusercontent.com/u/11673312?v=4)](https://github.com/TcFxGt4AGE "TcFxGt4AGE (2 commits)")[![ScottPenhall98](https://avatars.githubusercontent.com/u/39621403?v=4)](https://github.com/ScottPenhall98 "ScottPenhall98 (1 commits)")[![SuryaVanLierde](https://avatars.githubusercontent.com/u/71955395?v=4)](https://github.com/SuryaVanLierde "SuryaVanLierde (1 commits)")

### Embed Badge

![Health badge](/badges/webfox-laravel-forms/health.svg)

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

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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