PHPackages                             manojo123/nova-attach-pivot - 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. manojo123/nova-attach-pivot

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

manojo123/nova-attach-pivot
===========================

Attach Pivot Nova field

1.0.18(5y ago)03111MITVuePHP &gt;=7.1.0

Since Feb 2Pushed 5y agoCompare

[ Source](https://github.com/manojo123/nova-attach-pivot)[ Packagist](https://packagist.org/packages/manojo123/nova-attach-pivot)[ RSS](/packages/manojo123-nova-attach-pivot/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)DependenciesVersions (20)Used By (0)

Whats New?
----------

[](#whats-new)

- You can use attachPivot field with pivot Fields.
- You can search elements by custom fields instead only name

Nova Attach Pivot
=================

[](#nova-attach-pivot)

##### Forked from Dillingham's REPO. Changed the name to avoid dependencies conflicts. I will be so grateful if someone can use this branch and finish the TODO list.

[](#forked-from-dillinghams-repo-changed-the-name-to-avoid-dependencies-conflicts-i-will-be-so-grateful-if-someone-can-use-this-branch-and-finish-the-todo-list)

[![Latest Version on Github](https://camo.githubusercontent.com/48687df49cbf427989cbcf5213b9465a117cadc07001818637938564ce3a193a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f64696c6c696e6768616d2f6e6f76612d6174746163682d6d616e792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dillingham/nova-attach-many)[![Total Downloads](https://camo.githubusercontent.com/7221822911b13d5863a8cd6c7f6e8f7c701cbac096eafeb059e5c620906140d2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64696c6c696e6768616d2f6e6f76612d6174746163682d6d616e792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dillingham/nova-attach-many) [![Twitter Follow](https://camo.githubusercontent.com/1422ca8b61662d8c04396cb0fb92021ab5d6c7f03d2a5641ee4efe7c4c79344e/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f64696c6c696e6768616d6d6d3f636f6c6f723d253233316461316631266c6162656c3d54776974746572266c6f676f3d253233316461316631266c6f676f436f6c6f723d253233316461316631267374796c653d666c61742d737175617265)](https://twitter.com/dillinghammm)

Belongs To Many create &amp; edit form UI for Nova. Enables attaching relationships easily and includes validation.

[![attach-pivot](https://user-images.githubusercontent.com/29180903/52160651-be7fd580-2687-11e9-9ece-27332b3ce6bf.png)](https://user-images.githubusercontent.com/29180903/52160651-be7fd580-2687-11e9-9ece-27332b3ce6bf.png)

### Installation

[](#installation)

```
composer require manojo123/nova-attach-pivot
```

### Usage

[](#usage)

```
use NovaAttachPivot\AttachPivot;
```

```
public function fields(Request $request)
{
    return [
        AttachPivot::make('Permissions'),
    ];
}
```

### Validation

[](#validation)

You can set min, max, size or custom rule objects

```
->rules('min:5', 'max:10', 'size:10', new CustomRule)
```

[![](https://user-images.githubusercontent.com/29180903/52160802-9ee9ac80-2689-11e9-9657-80e3c0d83b27.png)](https://user-images.githubusercontent.com/29180903/52160802-9ee9ac80-2689-11e9-9657-80e3c0d83b27.png)

### Options

[](#options)

Here are a few customization options

- `->showCounts()` Shows "selected/total"
- `->pivotFields(['qty'])` Adds pivot fields to be attached inline
- `->searchableFields(['bar_code'])` Search box can find by name plus all fields defined in this method
- `->showPreview()` Shows only selected
- `->hideToolbar()` Removes search &amp; select all
- `->height('500px')` Set custom height
- `->fullWidth()` Set to full width
- `->help('Tip: help text')` Set the help text

### All Options Demo

[](#all-options-demo)

[![](https://user-images.githubusercontent.com/29180903/53781117-6978ee80-3ed5-11e9-8da4-d2f2408f1ffb.png)](https://user-images.githubusercontent.com/29180903/53781117-6978ee80-3ed5-11e9-8da4-d2f2408f1ffb.png)

### Relatable

[](#relatable)

The attachable resources will be filtered by relatableQuery() So you can filter which resources are able to be attached

### Authorization

[](#authorization)

This field also respects policies: ie Role / Permission

- RolePolicy: attachAnyPermission($user, $role)
- RolePolicy: attachPermission($user, $role, $permission)
- PermissionPolicy: viewAny($user)

### TODO

[](#todo)

\[\] Add pagination for large amount of resources \[\] Pass Nova Fields instead array of strings in pivotFields with full field framework customization. (Rules, Types, etc) \[\] Refactorate code and perform some unit tests.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~37 days

Recently: every ~31 days

Total

19

Last Release

2027d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/84d96fcfa2fc4fa38071736f6e5c202603171ee709f677fc30b319166c0caf41?d=identicon)[manojo123](/maintainers/manojo123)

---

Top Contributors

[![ahmedkandel](https://avatars.githubusercontent.com/u/28398523?v=4)](https://github.com/ahmedkandel "ahmedkandel (4 commits)")[![manojo123](https://avatars.githubusercontent.com/u/20805943?v=4)](https://github.com/manojo123 "manojo123 (4 commits)")[![niladam](https://avatars.githubusercontent.com/u/4151765?v=4)](https://github.com/niladam "niladam (3 commits)")[![dillingham](https://avatars.githubusercontent.com/u/29180903?v=4)](https://github.com/dillingham "dillingham (1 commits)")[![mziraki](https://avatars.githubusercontent.com/u/6510195?v=4)](https://github.com/mziraki "mziraki (1 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/manojo123-nova-attach-pivot/health.svg)

```
[![Health](https://phpackages.com/badges/manojo123-nova-attach-pivot/health.svg)](https://phpackages.com/packages/manojo123-nova-attach-pivot)
```

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3453.7M8](/packages/optimistdigital-nova-multiselect-field)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

52178.7k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17186.3k1](/packages/murdercode-nova4-tinymce-editor)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11273.0k](/packages/datomatic-nova-detached-actions)[wemersonrv/input-mask

A Laravel Nova custom field text with masks on input

1198.4k](/packages/wemersonrv-input-mask)

PHPackages © 2026

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