create option form error
Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints(): Argument #1 ($relationship) must be of type Illuminate\Database\Eloquent\Relations\Relation, null given, called in
How do i fix
4 Replies
share your code please
Thanks very much but I was able to fix it
what was the problem?
Old, but for the sake of solving this for other searchers in the future.
The relationship() on the select inside of a repeater that is linked to a pivot table, has to refer to the relationship on the pivot table, not the current model, might be obvious in hindsight, but i confused myself by having a relationship that has almost the same name on the pivot and the root model.
In the image i have a SubscriptionPlan which has many Products via a ProductSubscriptionPlan Pivot table where i configure the options for this product on this specific subscription plan.
So the product_id selector inside the repeater is meant to use the Pivot table "belongsTo product" relationship, not the "belongsToMany products" on the SubscriptionPlan.