Replies: 2 comments 1 reply
-
|
I may have found a solution, but feedback is welcome. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
I had the same problem today, and found another, potentially better, solution. Here is an example from my project where I need to filter based on an enum of types. Repeater::make('quiz_grades')
->relationship('grades', fn (Builder $query) => $query->where('type', GradeType::Quiz))In your case, I believe something like this should work: Repeater::make('bedrooms')
->relationship('rooms', fn (Builder $query) => $query->where('type', 'bedroom')) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Package
Form builder
Package Version
v3.2.80
How can we help you?
I have a form for let's say a house.
All the data for that house is in a single JSON. So, no eloquent relationship.
The form has a repeater for each of the rooms.
Is it possible to filter which rooms are shown in the repeater?
E.g. only show the rooms of
type: bedroom.Beta Was this translation helpful? Give feedback.
All reactions