Setting relationship name for attach action
I have a resource called NotifiableEvent, it has a many to many with NotifiableUsers.
I have a relationmanager on the Event resource, which points to NotifiableUsers, but the relation in the model is defined as 'events', but I get this error when I click the default attach action
Call to undefined method App\Models\NotifiableUsers::notifiableEvents()
How can I tell it to look for the 'events' defined relation function instead?4 Replies
The table shows fine etc, and it detaches records fine, its literally just the attach action
https://filamentphp.com/docs/3.x/panels/resources/relation-managers#creating-a-relation-manager
in the command there's a param to define the relationship
Yeah, I already done that 😬
php artisan make:filament-relation-manager NotifiableUsersResource events display_nameOh wait Yeah wrong way round Even when I correct it, still getting same error
thats weird, should work based on the relationship defined in the command. Maybe a bug