gheith3/filament-relation-pages
Filament Relation Pages lets you add fully custom, free-form tabs alongside Relation Managers in any resource—no forced table or relationship. Build pages with Filament schema components, Blade/HTML, Alpine.js, and more. Includes an artisan generator.
RelationManager pattern, leveraging its HasRelationManagers trait and Livewire integration. This ensures seamless integration without requiring custom panel or middleware changes.RelationPage class abstracts away boilerplate, allowing developers to focus on custom UI logic (e.g., schemas, Blade views, or Alpine.js) while adhering to Filament’s conventions.InteractsWithSchemas trait, the package enables dynamic schema generation (e.g., content(Schema $schema)), reducing redundancy for common UI patterns (e.g., infolists, forms).make:filament-relation-page command generates both PHP and Blade files, accelerating development cycles. Custom stubs further enable team-specific templates.canViewForRecord, getTabComponent) minimizes breaking changes.HasRelationManagers) could pose risks if Filament changes its API. However, the package’s minimal surface area (3 static methods) mitigates this.#[Locked] properties). Developers unfamiliar with Livewire may need ramp-up time.$isLazy = true) improves initial load times but may introduce latency for first-time tab access. Testing with large datasets is recommended.RelationManager tables?RelationManager customization, HasActions) achieve similar goals with less overhead?laravel-activitylog for audit tabs) that could complement this?Infolists, Forms). No additional PHP extensions or JavaScript frameworks are required.ownerRecord or related models.Buildings) to test the make:filament-relation-page command and customization workflow.RelationManager tabs and actions.RelationManager tables with relation pages where appropriate.filament-spatie-media-library) as long as they don’t conflict with getRelations().--panel=admin flag in the Artisan command).RelationManager behavior.composer require gheith3/filament-relation-pages
php artisan make:filament-relation-page SummaryPage --resource=Buildings
content(Schema $schema) for Filament components.canViewForRecord, getBadge).getRelations() method.README.md in the resource directory).getRelations() includes the page class and canViewForRecord returns true.content(Schema $schema) return valid schemas.wire:log for Livewire data.dd($this->ownerRecord) in the relation page class.->remember(3600)).#[Locked] properties to prevent race conditions.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Tab fails to render | Broken UI, user confusion | Add @error directives in Blade and validate content(Schema $schema) returns a valid schema. |
| Lazy-loaded tab times out | Poor UX, abandoned workflows | Set reasonable timeouts or preload critical data. |
ownerRecord is |
How can I help you explore Laravel packages today?