© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•8mo ago•
1 reply
Carlos

Render component inside relation manager

Hi everyone,

I'm trying to render a Livewire component inside a Filament RelationManager page using a custom trait with a render hook. Here's the method I'm using:

protected function registerFooterComponent(string $componentClass, array $props = []): void
{
    FilamentView::registerRenderHook(
        PanelsRenderHook::RESOURCE_RELATION_MANAGER_AFTER,
        fn (): string => Livewire::mount($componentClass, $props)
    );
}
protected function registerFooterComponent(string $componentClass, array $props = []): void
{
    FilamentView::registerRenderHook(
        PanelsRenderHook::RESOURCE_RELATION_MANAGER_AFTER,
        fn (): string => Livewire::mount($componentClass, $props)
    );
}


In my boot() method of a RelationManager, I call:

$this->registerFooterComponent(\App\Livewire\MyComponent::class, [
    'record' => $this->getOwnerRecord(),
]);
$this->registerFooterComponent(\App\Livewire\MyComponent::class, [
    'record' => $this->getOwnerRecord(),
]);


The Livewire component is mounted and the HTML wrapper is visible in the DOM (i.e., <div id="component-container">...</div>), but the actual content inside the component isn't displaying.

I’ve also registered a JS file using:

FilamentView::registerRenderHook('panels::body.end', fn (): string => Blade::render("@vite('resources/js/my-component.js')"),
    scopes: [
        AnotherResourceRelationManager::class,
    ],
);
FilamentView::registerRenderHook('panels::body.end', fn (): string => Blade::render("@vite('resources/js/my-component.js')"),
    scopes: [
        AnotherResourceRelationManager::class,
    ],
);


Is there a better way to render Livewire components dynamically in a RelationManager?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Render relation manager inside resource form tab?
FilamentFFilament / ❓┊help
3y ago
Render relation manager under condition
FilamentFFilament / ❓┊help
11mo ago
TextInputColumn on pivot table inside relation manager
FilamentFFilament / ❓┊help
2y ago
Relation Manager
FilamentFFilament / ❓┊help
2y ago