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
LeandroFerreira
LeandroFerreira8mo ago
share your code please
antiquarian_capsaicin
Thanks very much but I was able to fix it
electronick86
electronick867mo ago
what was the problem?
Helge Sverre
Helge Sverre7mo ago
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.
No description
Want results from more Discord servers?
Add your server
More Posts