unknown field on BelongsToMany relationship
In my UserResource class, I have a select:
When I attempt to save I get the error:
For some reason it's not automatically applying the pivot table records like the documentation indicates. I have relationships established on both models:
User:
Locations:
Any idea what could be causing it? I do have a
When I attempt to save I get the error:
For some reason it's not automatically applying the pivot table records like the documentation indicates. I have relationships established on both models:
User:
Locations:
Any idea what could be causing it? I do have a
mutateFormDataBeforeSave method in my EditUser resource, but I'm not touching anything related to this relationship in that method.Solution
$get('role_id') === 1 will likely fail anyway as $get is a string so you need to either cast it with (int) or 1 = '1'
I am wondering if because you are passing disabled/enabled one of the methods for the relationship is being skipped
Can you move ->relationship() to below disabled?
I am wondering if because you are passing disabled/enabled one of the methods for the relationship is being skipped
Can you move ->relationship() to below disabled?