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
Jamie Cee
Jamie CeeOP2w ago
The table shows fine etc, and it detaches records fine, its literally just the attach action
Jamie Cee
Jamie CeeOP2w ago
Yeah, I already done that 😬
php artisan make:filament-relation-manager NotifiableUsersResource events display_name
Oh wait Yeah wrong way round Even when I correct it, still getting same error
Bruno Pereira
Bruno Pereira2w ago
thats weird, should work based on the relationship defined in the command. Maybe a bug

Did you find this page helpful?