Download the PHP package blendbyte/nova-items-field without Composer
On this page you can find all versions of the php package blendbyte/nova-items-field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nova-items-field
Nova Items Field
Laravel Nova array items field with sorting, validation & many display options.
Forked from dillingham/nova-items-field.

Installation
Quick Start
Be sure to cast the property as an array on your Eloquent model:
Validation
Use Laravel's built-in array validation:
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 can also use explicit attribute names — the behaviour is exactly the same:
Array Processing
Use the array to perform other actions by making an observer:
Customizing the Vue Component
You can replace the default item Vue component — see this walkthrough for a brief guide.
Options
| Method | Description | Default |
|---|---|---|
->max(number) |
Limit number of items allowed | false |
->draggable() |
Turn on drag/drop sorting | false |
->fullWidth() |
Increase the width of the field area | false |
->maxHeight(pixel) |
Limit the height of the list | false |
->listFirst() |
Move "add new" to the bottom | false |
->inputType(text) |
Input type: text, date, etc. |
"text" |
->placeholder($value) |
Placeholder text for the new item input | "Add a new item" |
->deleteButtonValue($value) |
Label for the delete button | "x" |
->createButtonValue($value) |
Label for the create button | "Add" |
->hideCreateButton() |
Hide the "Add" button | false |
->indexAsList() |
Display items as a list on index instead of a count | false |
->detailsAsTotal() |
Display item count on detail view instead of a list | false |
Maintained by Blendbyte
Blendbyte builds cloud infrastructure, web apps, and developer tools.
We've been shipping software to production for 20+ years.
This package runs in our own stack, which is why we keep it maintained.
Issues and PRs get read. Good ones get merged.