components([ TextInput::make('name') ->required(), TextInput::make('email') ->label('Email address') ->email() ->required(), DateTimePicker::make('email_verified_at'), TextInput::make('password') ->password() ->required() ->visibleOn(['create']), Select::make('roles') ->relationship('roles', 'title') ->label('Rollen') ->preload() ->multiple(), Select::make('groups') ->relationship('groups', 'name') ->label('Gruppen') ->preload() ->createOptionForm(function (Schema $schema) { return GroupForm::configure($schema); }) ->multiple(), ]); } }