PHPackages                             paulvl/nova-items-field - 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. paulvl/nova-items-field

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

paulvl/nova-items-field
=======================

Nova field to handle array columns

1.0(1y ago)06MITVuePHP ^8.1

Since Feb 5Pushed 1y agoCompare

[ Source](https://github.com/paulvl/nova-items-field)[ Packagist](https://packagist.org/packages/paulvl/nova-items-field)[ RSS](/packages/paulvl-nova-items-field/feed)WikiDiscussions nova5 Synced today

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

Nova Items Field
----------------

[](#nova-items-field)

Laravel Nova array items field with sorting, validation &amp; many [display options](#additional-options)

[![nova-array-input-field](https://user-images.githubusercontent.com/29180903/51337942-7d1be300-1a56-11e9-84fa-66f5b285c279.png)](https://user-images.githubusercontent.com/29180903/51337942-7d1be300-1a56-11e9-84fa-66f5b285c279.png)

### Installation

[](#installation)

```
composer require paulvl/nova-items-field

```

### Usage

[](#usage)

```
use NovaItemsField\Items;
```

```
function fields() {
    return [
        Items::make('Emails')
    ]
}
```

and be sure to [cast](https://laravel.com/docs/5.7/eloquent-mutators#array-and-json-casting) the property as an array on your eloquent model

```
public $casts = [
    'emails' => 'array'
];
```

### Validation

[](#validation)

Use Laravel's built in [array validation](https://laravel.com/docs/5.7/validation#validating-arrays)

```
Items::make('Emails')->rules([
     null => 'required|min:2'
     '*' => 'email|min:10',
]),
```

In this case, an error is produced if there aren't at least 2 items in the array and if each item is not a valid email or is shorter than 10 characters.

You might prefer to use explicit attribute names, the behaviour is exactly the same as before

```
Items::make('Emails', 'user_email')->rules([
    'user_email' => 'required|min:2',
    'user_email.*' => 'email|min:10',
]),
```

### Array processing

[](#array-processing)

Use the array to perform other actions by making an [observer](https://nova.laravel.com/docs/1.0/resources/#resource-events)

```
function saving($user)
{
    foreach($user->emails as $email)
    {
        //
    }
}
```

### Replace item vue component

[](#replace-item-vue-component)

Here's a brief walkthrough to customize the vue item - [view](https://github.com/dillingham/nova-items-field/issues/10#issuecomment-527315057)

### Additional options

[](#additional-options)

functiondescriptiondefault`->max(number)`limit number of items allowedfalse`->draggable()`turn on drag/drop sortingfalse`->fullWidth()`increase the width of field areafalse`->maxHeight(pixel)`limit the height of the listfalse`->listFirst()`move add new to the bottomfalse`->inputType(text)`text, date, etc"text"`->placeholder($value)`the new item input text"Add a new item"`->deleteButtonValue($value)`value for delete button"x"`->createButtonValue($value)`value for create button"Add"`->hideCreateButton()`hide the "add" buttonfalse`->indexAsList()`display items as list on index instead of total numberfalse`->detailsAsTotal()`display total of items on detail view instead of listfalse

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance40

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.3% 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

514d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fdef0e996f65b82fd2c344429cd17177695635620eb34908c87dfbccd062fe0?d=identicon)[paulvl](/maintainers/paulvl)

---

Top Contributors

[![bashgeek](https://avatars.githubusercontent.com/u/4669888?v=4)](https://github.com/bashgeek "bashgeek (32 commits)")[![dillingham](https://avatars.githubusercontent.com/u/29180903?v=4)](https://github.com/dillingham "dillingham (7 commits)")[![paulvl](https://avatars.githubusercontent.com/u/8441051?v=4)](https://github.com/paulvl "paulvl (3 commits)")[![gerardnll](https://avatars.githubusercontent.com/u/2018022?v=4)](https://github.com/gerardnll "gerardnll (3 commits)")[![marijoo](https://avatars.githubusercontent.com/u/360736?v=4)](https://github.com/marijoo "marijoo (1 commits)")[![pindab0ter](https://avatars.githubusercontent.com/u/5128166?v=4)](https://github.com/pindab0ter "pindab0ter (1 commits)")[![royduin](https://avatars.githubusercontent.com/u/1703233?v=4)](https://github.com/royduin "royduin (1 commits)")[![scramatte](https://avatars.githubusercontent.com/u/188766?v=4)](https://github.com/scramatte "scramatte (1 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/paulvl-nova-items-field/health.svg)

```
[![Health](https://phpackages.com/badges/paulvl-nova-items-field/health.svg)](https://phpackages.com/packages/paulvl-nova-items-field)
```

###  Alternatives

[ebess/advanced-nova-media-library

Laravel Nova tools for managing the Spatie media library.

6163.5M22](/packages/ebess-advanced-nova-media-library)[optimistdigital/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2852.1M6](/packages/optimistdigital-nova-sortable)[outl1ne/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2862.1M9](/packages/outl1ne-nova-sortable)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[advoor/nova-editor-js

A Laravel Nova field bringing EditorJs magic to Nova.

92219.3k3](/packages/advoor-nova-editor-js)[outl1ne/nova-page-manager

Page(s) and region(s) manager for Laravel Nova.

17947.0k](/packages/outl1ne-nova-page-manager)

PHPackages © 2026

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