PHPackages                             blendbyte/nova-attach-many - 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. [Admin Panels](/categories/admin)
4. /
5. blendbyte/nova-attach-many

ActiveLibrary[Admin Panels](/categories/admin)

blendbyte/nova-attach-many
==========================

BelongsToMany attach UI for Laravel Nova — searchable, validatable, with sync notifications &amp; policy support. Fork of dillingham/nova-attach-many, maintained for Nova 5.

2.0.1(10mo ago)12392.6k↓46.3%9[3 issues](https://github.com/blendbyte/nova-attach-many/issues)MITPHPPHP ^8.1

Since Feb 2Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/blendbyte/nova-attach-many)[ Packagist](https://packagist.org/packages/blendbyte/nova-attach-many)[ RSS](/packages/blendbyte-nova-attach-many/feed)WikiDiscussions nova5 Synced today

READMEChangelog (10)Dependencies (2)Versions (30)Used By (0)

Nova Attach Many
================

[](#nova-attach-many)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9e6041755523f792ffa27636fa78303dbe3de7bba664904646013a49d0f808a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c656e64627974652f6e6f76612d6174746163682d6d616e792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/blendbyte/nova-attach-many)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

BelongsToMany create &amp; edit form UI for Laravel Nova. Enables attaching relationships easily and includes validation.

Forked from [dillingham/nova-attach-many](https://github.com/dillingham/nova-attach-many).

[![attach-many](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 blendbyte/nova-attach-many
```

Quick Start
-----------

[](#quick-start)

```
use NovaAttachMany\AttachMany;

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

You can explicitly define the relationship &amp; Nova resource:

```
AttachMany::make('Field Name', 'relationshipName', RelatedResource::class);
```

Pivot Values
------------

[](#pivot-values)

You can pass additional parameters for any pivot value. See the Laravel docs on [syncing associations](https://laravel.com/docs/eloquent-relationships#syncing-associations) for details.

```
AttachMany::make('Field Name', 'relationshipName', RelatedResource::class, ['pivot_name' => value]);
```

Display on Detail
-----------------

[](#display-on-detail)

This package only provides the create/edit views that BelongsToMany does not. Use BelongsToMany for displaying the table on detail views:

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

Validation
----------

[](#validation)

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

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

[![validation example](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)

MethodDescription`->showCounts()`Shows "selected / total"`->showPreview()`Shows only selected items`->hideToolbar()`Removes search &amp; select all`->height('500px')`Set custom height`->fullWidth()`Set to full width`->showRefresh()`Request the resources again`->showSubtitle()`Show the resource's subtitle`->help('Tip: help text')`Set the help text[![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 control which resources are available for attachment.

Being Notified of Changes
-------------------------

[](#being-notified-of-changes)

Add a method to the resource to be notified of sync changes. The method must be a camel-cased version of the attribute name, followed by `Synced`:

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

public function permissionsSynced(array $changes)
{
    $changes['attached']; // IDs of attached models
    $changes['detached']; // IDs of detached models
    $changes['updated'];  // IDs of updated models
}
```

Authorization
-------------

[](#authorization)

This field respects policies. For example, with a Role / Permission setup:

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

Maintained by Blendbyte
-----------------------

[](#maintained-by-blendbyte)

 [   ![Blendbyte](https://camo.githubusercontent.com/09962a5684a0b50fb9eb44edfd8f2560be418bc8ce3d23a31f96395f3f14d58e/68747470733a2f2f7777772e626c656e64627974652e636f6d2f6c6f676f5f686f72697a6f6e74616c2e706e67)  ](https://www.blendbyte.com)

 **[Blendbyte](https://www.blendbyte.com)** 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.

 [blendbyte.com](https://www.blendbyte.com) ·

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance66

Regular maintenance activity

Popularity46

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

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

Recently: every ~131 days

Total

28

Last Release

319d ago

Major Versions

1.7.0 → 2.0.02024-12-16

PHP version history (4 changes)1.0PHP &gt;=7.1.0

1.4.0PHP ^7.3|^8.0

1.5.0PHP ^7.4|^8.0

2.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/69378377?v=4)[Blendbyte](/maintainers/blendbyte)[@blendbyte](https://github.com/blendbyte)

---

Top Contributors

[![bashgeek](https://avatars.githubusercontent.com/u/4669888?v=4)](https://github.com/bashgeek "bashgeek (30 commits)")[![dillingham](https://avatars.githubusercontent.com/u/29180903?v=4)](https://github.com/dillingham "dillingham (28 commits)")[![plantjes](https://avatars.githubusercontent.com/u/5704284?v=4)](https://github.com/plantjes "plantjes (8 commits)")[![alberto-bottarini](https://avatars.githubusercontent.com/u/1442934?v=4)](https://github.com/alberto-bottarini "alberto-bottarini (5 commits)")[![ahmedkandel](https://avatars.githubusercontent.com/u/28398523?v=4)](https://github.com/ahmedkandel "ahmedkandel (4 commits)")[![drsdre](https://avatars.githubusercontent.com/u/809827?v=4)](https://github.com/drsdre "drsdre (4 commits)")[![anditsung](https://avatars.githubusercontent.com/u/1090413?v=4)](https://github.com/anditsung "anditsung (4 commits)")[![niladam](https://avatars.githubusercontent.com/u/4151765?v=4)](https://github.com/niladam "niladam (3 commits)")[![bdelamatre](https://avatars.githubusercontent.com/u/3412927?v=4)](https://github.com/bdelamatre "bdelamatre (2 commits)")[![mbardelmeijer](https://avatars.githubusercontent.com/u/1583095?v=4)](https://github.com/mbardelmeijer "mbardelmeijer (2 commits)")[![robertmarney](https://avatars.githubusercontent.com/u/48888686?v=4)](https://github.com/robertmarney "robertmarney (1 commits)")[![bsormagec](https://avatars.githubusercontent.com/u/965219?v=4)](https://github.com/bsormagec "bsormagec (1 commits)")[![GautierDele](https://avatars.githubusercontent.com/u/12382966?v=4)](https://github.com/GautierDele "GautierDele (1 commits)")[![jjjrmy](https://avatars.githubusercontent.com/u/1609800?v=4)](https://github.com/jjjrmy "jjjrmy (1 commits)")[![lptn](https://avatars.githubusercontent.com/u/150333538?v=4)](https://github.com/lptn "lptn (1 commits)")[![MPaap](https://avatars.githubusercontent.com/u/10021557?v=4)](https://github.com/MPaap "MPaap (1 commits)")[![mrkishi](https://avatars.githubusercontent.com/u/150237?v=4)](https://github.com/mrkishi "mrkishi (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/blendbyte-nova-attach-many/health.svg)

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

###  Alternatives

[whitecube/nova-page

Static pages content management for Laravel Nova

23997.1k1](/packages/whitecube-nova-page)[optimistdigital/nova-page-manager

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

17989.5k](/packages/optimistdigital-nova-page-manager)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[optimistdigital/nova-table-field

Table field for Laravel Nova

40132.7k](/packages/optimistdigital-nova-table-field)[outl1ne/nova-table-field

Table field for Laravel Nova

4070.5k](/packages/outl1ne-nova-table-field)[khalin/nova-link-field

A Laravel Nova Link field.

31587.5k2](/packages/khalin-nova-link-field)

PHPackages © 2026

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