You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I have a select input with value "My Selection", then I want to assign this value to $mySelectionValue,
And also I have a text input with value "My input", then I want to assign this also to a $myInputValue,
How can I achieve this? Components\BelongsToSelect::make('category_id') ->relationship('category', 'name', function ($query) { return $query->where($mySelectionValue, $myInputValue); });
So I can create another dependent select and its query based on values from other form components values.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Let's say I have a
select input
with value "My Selection", then I want to assign this value to$mySelectionValue
,And also I have a
text input
with value "My input", then I want to assign this also to a$myInputValue
,How can I achieve this?
Components\BelongsToSelect::make('category_id')
->relationship('category', 'name', function ($query) {
return $query->where($mySelectionValue, $myInputValue);
});
So I can create another dependent select and its query based on values from other form components values.
Beta Was this translation helpful? Give feedback.
All reactions