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. blendbyte/nova-attach-many

ActiveLibrary

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

Attach Many Nova field

2.0.1(9mo ago)12335.7k—1.7%9[3 issues](https://github.com/blendbyte/nova-attach-many/issues)MITPHPPHP ^8.1

Since Feb 2Pushed 9mo 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 1mo ago

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

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

[](#nova-attach-many)

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

[![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
```

### Usage

[](#usage)

```
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.
For details, please check

```
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.

BelongsToMany should be used 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)
```

[![](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"
- `->showPreview()` Shows only selected
- `->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

[](#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

### Being Notified of Changes

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

You can add a method to the resource to be notified of the changes that have happened:

The method must be a camel cased version of the attribute name, followed by `Synced`. For example:

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

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

### Authorization

[](#authorization)

This field also respects policies: ie Role / Permission

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

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance53

Moderate activity, may be stable

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

273d 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://www.gravatar.com/avatar/12043214c857ec65b93c40b5322af6ea2c08cecac519b71149e2e61db228651e?d=identicon)[bashgeek](/maintainers/bashgeek)

---

Top Contributors

[![dillingham](https://avatars.githubusercontent.com/u/29180903?v=4)](https://github.com/dillingham "dillingham (28 commits)")[![bashgeek](https://avatars.githubusercontent.com/u/4669888?v=4)](https://github.com/bashgeek "bashgeek (27 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

[optimistdigital/nova-sortable

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

2872.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.

2861.8M9](/packages/outl1ne-nova-sortable)[laravel/nova-log-viewer

A Laravel Nova tool for viewing your application logs.

136301.3k1](/packages/laravel-nova-log-viewer)[stepanenko3/nova-command-runner

Laravel Nova tool for running Artisan and bash(shell) commands.

36983.0k](/packages/stepanenko3-nova-command-runner)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[dniccum/nova-documentation

A Laravel Nova tool that allows you to add markdown-based documentation to your administrator's dashboard.

37116.4k](/packages/dniccum-nova-documentation)

PHPackages © 2026

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