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
Hello!
Is there any way for a BelongsToSelect component to only show related models based on a condition (e.g. another BelongsToSelect value). public static function form(Form $form) { return $form ->schema([ Components\BelongsToSelect::make('user_id') ->required() ->relationship('user', 'name'), Components\BelongsToSelect::make('college_id') ->relationship('college', 'name') ->dependable() ->preload(), Components\BelongsToSelect::make('department_id') ->relationship('department', 'name') ->preload(), ]); }
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
-
Hello!
Is there any way for a BelongsToSelect component to only show related models based on a condition (e.g. another BelongsToSelect value).
public static function form(Form $form) { return $form ->schema([ Components\BelongsToSelect::make('user_id') ->required() ->relationship('user', 'name'), Components\BelongsToSelect::make('college_id') ->relationship('college', 'name') ->dependable() ->preload(), Components\BelongsToSelect::make('department_id') ->relationship('department', 'name') ->preload(), ]); }
Beta Was this translation helpful? Give feedback.
All reactions