PHPackages                             ibrostudio/filament-dynamic-resource-children - 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. ibrostudio/filament-dynamic-resource-children

ActiveLibrary[Admin Panels](/categories/admin)

ibrostudio/filament-dynamic-resource-children
=============================================

Allows Filament plugins developer to register pages or relation managers in a resource living at the app level or in an another plugin

v1.0.0(3y ago)06[3 PRs](https://github.com/iBroStudio/filament-dynamic-resource-children/pulls)MITPHPPHP ^8.1

Since Jun 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/iBroStudio/filament-dynamic-resource-children)[ Packagist](https://packagist.org/packages/ibrostudio/filament-dynamic-resource-children)[ Docs](https://github.com/ibrostudio/filament-dynamic-resource-children)[ RSS](/packages/ibrostudio-filament-dynamic-resource-children/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (16)Versions (5)Used By (0)

Filament Dynamic Resource Children
==================================

[](#filament-dynamic-resource-children)

[![Latest Version on Packagist](https://camo.githubusercontent.com/292c8ba1cd6a75ba37806ece40a079afab8ec683057b7f01fa86ae176a7ef361/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6962726f73747564696f2f66696c616d656e742d64796e616d69632d7265736f757263652d6368696c6472656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ibrostudio/filament-dynamic-resource-children)[![GitHub Tests Action Status](https://camo.githubusercontent.com/714f0a7c83197595faacc0309e7d595d251cbf6523af1483a89bfd2f8a41871d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6962726f73747564696f2f66696c616d656e742d64796e616d69632d7265736f757263652d6368696c6472656e2f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/ibrostudio/filament-dynamic-resource-children/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ec3047ac26a803ee90d5204d0485739a57f8dbe9bc23e5efd9e51063d74b3e2c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6962726f73747564696f2f66696c616d656e742d64796e616d69632d7265736f757263652d6368696c6472656e2f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/ibrostudio/filament-dynamic-resource-children/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)

This package allows [Filament](https://filamentphp.com/) plugins developer to register pages or relation managers in a resource living at the app level or in an another plugin.

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

[](#installation)

You can install the package via composer:

```
composer require ibrostudio/filament-dynamic-resource-children
```

Usage
-----

[](#usage)

#### Prepare your resource

[](#prepare-your-resource)

Add the trait `CanHaveDynamicChildren` to your resource class.

```
use IBroStudio\FilamentDynamicResourceChildren\Concerns\HasDynamicChildren;

class ExampleParentResource extends Resource
{
    use HasDynamicChildren;
}
```

Then, in that resource class, modify `getRelations()` and `getPages()` methods:

Before:

```
    public static function getRelations(): array
    {
        return [];
    }

    public static function getPages(): array
    {
        return [
            'index' => Pages\ListExampleParents::route('/'),
            'create' => Pages\CreateExampleParent::route('/create'),
            'view' => Pages\ViewExampleParent::route('/{record}'),
            'edit' => Pages\EditExampleParent::route('/{record}/edit'),
        ];
    }
```

After:

```
    public static function getRelations(): array
    {
        return array_merge(
            [],
            self::getDynamicRelationManagers()
        );
    }

    public static function getPages(): array
    {
        return array_merge(
            [
                'index' => Pages\ListExampleParents::route('/'),
                'create' => Pages\CreateExampleParent::route('/create'),
                'view' => Pages\ViewExampleParent::route('/{record}'),
                'edit' => Pages\EditExampleParent::route('/{record}/edit'),
            ],
            self::getDynamicPages()
        );
    }
```

#### Link your children with their parent

[](#link-your-children-with-their-parent)

Create your page or relation manager as usual in your plugin.

Then register it in your plugin service provider like this:

```
use App\Filament\Resources\ExampleParentResource;
use Filament\PluginServiceProvider;
use Spatie\LaravelPackageTools\Package;
use VendorName\MyPlugin\Filament\Resources\ExampleParentResource\Pages\MyFirstPage;
use VendorName\MyPlugin\Filament\Resources\ExampleParentResource\Pages\MySecondPage;
use VendorName\MyPlugin\Filament\Resources\ExampleParentResource\RelationManagers\MyFirstRelationManager;
use VendorName\MyPlugin\Filament\Resources\ExampleParentResource\RelationManagers\MySecondRelationManager;

class MyPluginServiceProvider extends PluginServiceProvider
{
    protected array $pages = [
        MyFirstPage::class,
        MySecondPage::class,
    ];

    protected array $relationManagers = [
        MyFirstRelationManager::class,
        MySecondRelationManager::class,
    ];

    public function configurePackage(Package $package): void
    {
        $this->packageConfiguring($package);

        $package
            ->name('my-plugin')
            ->hasViews();
    }

    public function packageRegistered(): void
    {
        parent::packageRegistered();

        $this->app->resolving('filament', function () {

            ExampleParentResource::addDynamicPages([
                'first-page-key' => [
                    'class' => MyFirstPage::class,
                    'route' => '/first-page-slug'
                ],
                'second-page-key' => [
                    'class' => MySecondPage::class,
                    'route' => '/second-page-slug'
                ],
            ]);

            ExampleParentResource::addDynamicRelationManagers([
                MyFirstRelationManager::class,
                MySecondRelationManager::class,
            ]);

        });
    }
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [iBroStudio](https://github.com/iBroStudio)
- [The Filament team](https://filamentphp.com/), thanks to them for their work

License
-------

[](#license)

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1433d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a456dae716df4be38cb7d5f02ca522a02ec37eda586ab0cae0f504516b7c1ef?d=identicon)[iBroStudio](/maintainers/iBroStudio)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![Yann-iBroStudio](https://avatars.githubusercontent.com/u/2676572?v=4)](https://github.com/Yann-iBroStudio "Yann-iBroStudio (4 commits)")

---

Tags

laravelfilament

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ibrostudio-filament-dynamic-resource-children/health.svg)

```
[![Health](https://phpackages.com/badges/ibrostudio-filament-dynamic-resource-children/health.svg)](https://phpackages.com/packages/ibrostudio-filament-dynamic-resource-children)
```

###  Alternatives

[awcodes/filament-quick-create

Plugin for Filament Admin that adds a dropdown menu to the header to quickly create new items.

246177.6k7](/packages/awcodes-filament-quick-create)[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)[ralphjsmit/laravel-filament-seo

A package to combine the power of Laravel SEO and Filament Admin.

15398.7k10](/packages/ralphjsmit-laravel-filament-seo)[caresome/filament-neobrutalism-theme

A neobrutalism theme for FilamentPHP admin panels

303.2k](/packages/caresome-filament-neobrutalism-theme)[andreia/filament-ui-switcher

Add a modal with options to switch between different UI layouts and styles (colors, fonts, font sizes).

233.8k](/packages/andreia-filament-ui-switcher)[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)
