PHPackages                             headlesslaravel/fields - 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. headlesslaravel/fields

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

headlesslaravel/fields
======================

Structure frontend fields with PHP

0.0.1(2y ago)126MITPHP

Since May 29Pushed 2y ago2 watchersCompare

[ Source](https://github.com/headlesslaravel/fields)[ Packagist](https://packagist.org/packages/headlesslaravel/fields)[ RSS](/packages/headlesslaravel-fields/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Fields
======

[](#fields)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7400aaf7322a92a1ec0a7bed560ca5bc3be64c92e26dce3278bf0882bdeade8a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686561646c6573736c61726176656c2f6669656c64732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/headlesslaravel/fields)\[[![GitHub Tests Action Status](https://camo.githubusercontent.com/7f2153886fdc7735ca2162b34f48a9b03dc9ecf64e0dc93a423b3e4ae8afc589/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f686561646c6573736c61726176656c2f6669656c64732f72756e2d74657374733f6c6162656c3d7465737473)](https://camo.githubusercontent.com/7f2153886fdc7735ca2162b34f48a9b03dc9ecf64e0dc93a423b3e4ae8afc589/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f686561646c6573736c61726176656c2f6669656c64732f72756e2d74657374733f6c6162656c3d7465737473)\](

A Laravel package that simplifies the process of formatting fields for display and forms in your Inertia.js projects. With this package, you can easily define Vue components, and populate data when needed. This package is particularly useful for developers working with Laravel, Inertia.js, and Vue.js.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Available Fields](#available-fields)
- [Contributing](#contributing)
- [License](#license)

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

[](#installation)

To install the Laravel Inertia Field Formatter package, you can use Composer:

```
composer require headlesslaravel/fields
```

Usage
-----

[](#usage)

After installing the package, you can use the `Fields` class to create form and display field configurations. These configurations can be used to define Vue components and populate data when necessary.

To create a form field configuration, you can use the `Fields::form()` method:

```
$fields = Fields::form([
    // Your field configurations
]);
```

To create a display field configuration, you can use the `Fields::display()` method:

```
$fields = Fields::display([
    // Your field configurations
], $data);
```

Both methods accept an array of field configurations. You can create field configurations using the `Text::make()` method. The first parameter is the label for the field, and the second parameter is an optional key that will be used to populate data for display fields.

You can also chain additional properties to the field configuration, like setting the `span` property for the grid system:

```
Text::make('First Name')->prop('span', 6)
```

Examples
--------

[](#examples)

Here is a more generic example of using the Laravel Inertia Field Formatter package:

```
// Form field configuration
$formFields = Fields::form([
    Text::make('First Name')->prop('span', 6),
    Text::make('Last Name')->prop('span', 6),
    Text::make('Email')->prop('span', 6),
    Text::make('Phone')->prop('span', 6),
]);

// Display field configuration
$displayFields = Fields::display([
    Text::make('Name', 'name'),
    Text::make('Email', 'email'),
    Text::make('Phone', 'phone'),
], $user);

// Return the field configurations as an array
return [
    'form' => $formFields,
    'display' => $displayFields,
];
```

Available Fields
================

[](#available-fields)

FieldDescriptionCheckboxA field representing a checkbox input, allowing for boolean values.CountA field representing a counter, displaying the number of items in a collection.DividerA field used to add a visual divider or separator between other fields in a form or display.FieldThe base field class from which all other field classes inherit.FieldsA class responsible for creating and managing form and display field configurations.ItemsA field representing a list of items, useful for displaying collections or arrays of data.LinkA field representing a hyperlink, allowing navigation to other pages or resources.MoneyA field representing a monetary value, formatted according to the specified currency and locale.NumberA field representing a numeric input, allowing for integer or decimal values.PanelA container for organizing and grouping related fields within a form or display.PickerA field representing a picker input, allowing users to select an option from a list (e.g. date picker).RepeatA field allowing the user to input a set of repeating values, useful for creating dynamic forms.SectionA container for organizing and grouping related fields within a form or display, with a title.SelectA field representing a dropdown select input, allowing users to choose one or multiple options.TextA field representing a text input, allowing for single-line text values.TextareaA field representing a textarea input, allowing for multi-line text values.TimestampA field representing a timestamp, displaying a formatted date and time based on a specified format.Contributing
------------

[](#contributing)

Contributions are welcome! If you find a bug or have a suggestion, please open an issue on the GitHub repository. If you'd like to contribute code, please submit a pull request.

License
-------

[](#license)

This package is released under the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

1085d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29180903?v=4)[Brian](/maintainers/dillingham)[@dillingham](https://github.com/dillingham)

---

Top Contributors

[![dillingham](https://avatars.githubusercontent.com/u/29180903?v=4)](https://github.com/dillingham "dillingham (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/headlesslaravel-fields/health.svg)

```
[![Health](https://phpackages.com/badges/headlesslaravel-fields/health.svg)](https://phpackages.com/packages/headlesslaravel-fields)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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