F
Filamentβ€’4mo ago
morty

AttachAction select different relationship?

I have two models with a BelongsToMany relationship: Account and AccountCollection. I also have an AccountsRelationManager on an AccountCollectionResource. I have a relationship setup on the Account model called collections() rather than the Laravel naming convention of accountCollections(). When I try to attach an account on the relation manager, I get the following error:
Call to undefined method App\Models\Crm\Account::accountCollections()
It seems the AttachAction is looking for a relationship that doesn't exist. How can I fix this without renaming my relationship? Is there an option on the AttachAction I can use?
1 Reply
Solution
morty
mortyβ€’4mo ago
Want results from more Discord servers?
Add your server