Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bashgeek committed Apr 12, 2022
1 parent 5acae84 commit 5045b8a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 63 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "dillingham/nova-items-field",
"name": "blendbyte/nova-items-field",
"description": "Nova field to handle array columns",
"keywords": [
"laravel",
Expand Down
23 changes: 5 additions & 18 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
## Nova Items Field

[![Latest Version on Github](https://img.shields.io/github/release/dillingham/nova-items-field.svg?style=flat-square)](https://packagist.org/packages/dillingham/nova-items-field)
[![Total Downloads](https://img.shields.io/packagist/dt/dillingham/nova-items-field.svg?style=flat-square)](https://packagist.org/packages/dillingham/nova-items-field) [![Twitter Follow](https://img.shields.io/twitter/follow/im_brian_d?color=%231da1f1&label=Twitter&logo=%231da1f1&logoColor=%231da1f1&style=flat-square)](https://twitter.com/im_brian_d)

Laravel Nova array items field with sorting, validation & many [display options](https://github.com/dillingham/nova-items-field#additional-options)
Laravel Nova array items field with sorting, validation & many [display options](#additional-options)

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

### Installation
```
composer require dillingham/nova-items-field
composer require blendbyte/nova-items-field
```

### Usage
Expand All @@ -30,7 +27,9 @@ public $casts = [
'emails' => 'array'
];
```

### Validation

Use Laravel's built in [array validation](https://laravel.com/docs/5.7/validation#validating-arrays)
```php
Items::make('Emails')->rules([
Expand All @@ -43,6 +42,7 @@ Items::make('Long Text', 'attribute')->rules([
'attribute.*' => 'email|min:10',
]),
```

### Array processing

Use the array to perform other actions by making an [observer](https://nova.laravel.com/docs/1.0/resources/#resource-events)
Expand All @@ -61,8 +61,6 @@ function saving($user)

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



### Additional options

| function | description | default |
Expand All @@ -77,14 +75,3 @@ Here's a brief walkthrough to customize the vue item - [view](https://github.com
| `->deleteButtonValue($value)` | value for delete button | "x" |
| `->createButtonValue($value)` | value for create button | "Add" |
| `->hideCreateButton()` | hide the "add" button | false |


---

# Author

Hi 👋, Im Brian Dillingham, creator of this Nova package [and others](https://novapackages.com/collaborators/dillingham)

Hope you find it useful. Feel free to reach out with feedback.

Follow me on twitter: [@im_brian_d](https://twitter.com/im_brian_d)
43 changes: 0 additions & 43 deletions todo.md

This file was deleted.

2 changes: 1 addition & 1 deletion webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ mix
.setPublicPath('dist')
.js('resources/js/field.js', 'js')
.vue({ version: 3 })
.nova('dillingham/nova-items-field')
.nova('blendbyte/nova-items-field')

0 comments on commit 5045b8a

Please sign in to comment.