F
Filamentβ€’9mo ago
iRelaxer

Show users who are not in team

Hi, i'm trying to create a form which can be used to add members to a team. I'm using a repeater to manage existing users using the following code:
Forms\Components\Repeater::make('teamUsers') ->relationship() ->simple( Forms\Components\Select::make('user_id') ->placeholder('Select a user') ->relationship( 'user', 'name', modifyQueryUsing: function (Builder $query) {} ) ->required() ->searchable(), ),
I'm using a repeater on TeamUser (pivot). How can i only show users who are not in the team already?
2 Replies
iRelaxer
iRelaxerβ€’9mo ago
No description
iRelaxer
iRelaxerβ€’9mo ago
Any suggestions? πŸ™‚ Bump. It would be nice if someone could help me out. Tried multiple things here($state, $get) even custom queries. Which do not work