© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
marco.ferreira

Cannot test a RelationManager

I'm trying to test a relation manager (to make sure some records are visible). As per documentation, I do a
livewire(EmployeesRelationManager::class)
livewire(EmployeesRelationManager::class)
and it worked correctly on v2. Now, on v3, it fails with the error
Filament\Resources\RelationManagers\RelationManager::getTitle(): Argument #2 ($pageClass) must be of type string, null given, called in .../vendor/filament/filament/src/Resources/RelationManagers/RelationManager.php on line 476
Filament\Resources\RelationManagers\RelationManager::getTitle(): Argument #2 ($pageClass) must be of type string, null given, called in .../vendor/filament/filament/src/Resources/RelationManagers/RelationManager.php on line 476
. I can't figure out how to solve or what I have to do since my EmployeesRelationManager is a simple RelationManager that only implements the form() and table() functions... Has this happened to anyone? How can I solve it?
Solution
Sorry, my mistake. I was not passing the second argument "pageClass"... This is the correct code, if anyone is interested:
$page = livewire(EmployeesRelationManager::class, [
        'ownerRecord' => $departments->get(0),
        'pageClass' => ViewDepartmentDetails::class,
    ])
$page = livewire(EmployeesRelationManager::class, [
        'ownerRecord' => $departments->get(0),
        'pageClass' => ViewDepartmentDetails::class,
    ])
Jump to solution
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

test relationmanager CreateAction
FilamentFFilament / ❓┊help
15mo ago
How to test the form of a RelationManager?
FilamentFFilament / ❓┊help
3y ago
Cannot delete test
FilamentFFilament / ❓┊help
3y ago
Positioning a RelationManager inside a Form
FilamentFFilament / ❓┊help
2y ago