PHPackages                             darmshot/filament-nested-resources - 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. darmshot/filament-nested-resources

ActiveLibrary

darmshot/filament-nested-resources
==================================

Nested resources plugin for Filament

v1.0.1(2y ago)062[3 PRs](https://github.com/darmshot/filament-nested-resources/pulls)MITPHPPHP ^8.1

Since Sep 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/darmshot/filament-nested-resources)[ Packagist](https://packagist.org/packages/darmshot/filament-nested-resources)[ Docs](https://github.com/darmshot/filament-nested-resources)[ GitHub Sponsors](https://github.com/darmshot)[ RSS](/packages/darmshot-filament-nested-resources/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (13)Versions (6)Used By (0)

Nested resources plugin for Filament 3
======================================

[](#nested-resources-plugin-for-filament-3)

[![Latest Version on Packagist](https://camo.githubusercontent.com/24f7cf989850cbd775f25122cff10896659e51dc23e063a7d96761c00854b193/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6461726d73686f742f66696c616d656e742d6e65737465642d7265736f75726365732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/darmshot/filament-nested-resources)

This package adds support for nested resources in Filament 3.

It provides the base classes and column to provide the nested structure.

It currently is not that configurable, and you need to follow naming conventions usually used by Laravel.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require darmshot/filament-nested-resources
```

Usage
-----

[](#usage)

However, you need to do a couple of changes to make this work. But you start of by creating a [filament resource](https://filamentphp.com/docs/3.x/panels/resources/getting-started)(The parent resource should already exist at this point. The resource we are changing is the child one).

Once you have that, you will need to change the `Filament/Resources/ChildModelResource.php` to the `NestedResource`.

```
use Darmshot\FilamentNestedResources\Columns\ChildResourceLink;
use Darmshot\FilamentNestedResources\NestedResource;

class ChildModelResource extends NestedResource
{
    public static function getParent(): string
    {
        return ParentModelResource::class;
    }
}
```

Then for each of the resource pages, you need to add traits:

```
use Darmshot\FilamentNestedResources\ResourcePages\NestedCreatePage;
use Darmshot\FilamentNestedResources\ResourcePages\NestedEditPage;
use Darmshot\FilamentNestedResources\ResourcePages\NestedListPage;
```

Finally, on your `ParentModelResource` you can add the column to provide the links:

```
public static function table(Table $table): Table
{
    return $table
        ->columns([
            ChildResourceLink::make(ChildModelResource::class),
        ]);
}
```

### Accessing the parent

[](#accessing-the-parent)

When you need the parent in livewire context such as the form, you can add the second argument to your form method:

```
public static function form(Form $form, ?Event $parent = null): Form;
```

Where `Event` is the model that should be the parent.

### Sidebar

[](#sidebar)

By default, when in a "context" the sidebar will register the menu item for that resource.

So if you are inside a Project which has documents, the sidebar will show documents when you are on a project or deeper level.

If you do not want this, you can set `shouldRegisterNavigationWhenInContext` to false in the child resource.

### Notes

[](#notes)

You cannot use a child resource for multiple parents, however, you can have multiple resources pointing to the same model.

Just make sure you set a custom slug for the resources so that it builds unique routes.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Stanislav Gerasimenko](https://github.com/darmshot)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.3% of commits — single point of failure

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

Total

2

Last Release

954d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/57bcd41bdebf72af4a7881fce84283b3f26635b12f032da99797cadaae38fd98?d=identicon)[darmshot](/maintainers/darmshot)

---

Top Contributors

[![darmshot](https://avatars.githubusercontent.com/u/29179227?v=4)](https://github.com/darmshot "darmshot (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravelfilament-nested-resourcesdarmshot

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/darmshot-filament-nested-resources/health.svg)

```
[![Health](https://phpackages.com/badges/darmshot-filament-nested-resources/health.svg)](https://phpackages.com/packages/darmshot-filament-nested-resources)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[guava/filament-knowledge-base

A filament plugin that adds a knowledge base and help to your filament panel(s).

206120.5k1](/packages/guava-filament-knowledge-base)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[bezhansalleh/filament-plugin-essentials

A collection of essential traits that streamline Filament plugin development by taking care of the boilerplate, so you can focus on shipping real features faster

27584.7k16](/packages/bezhansalleh-filament-plugin-essentials)[guava/filament-modal-relation-managers

Allows you to embed relation managers inside filament modals.

7565.0k4](/packages/guava-filament-modal-relation-managers)

PHPackages © 2026

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