Form Toggle relationship

Hi!
How ca I have a relationship for this toggle and keep this layout?

            Group::make()                
                ->schema([
                    Section::make('Connexion')                                                
                        ->schema([
                            TextInput::make('name')
                                ->label('Utilisateur')
                                ->required(),
                            TextInput::make('email')
                                ->email()
                                ->label('E-mail')
                                ->required(),
                            TextInput::make('password')
                                ->password()
                                ->dehydrateStateUsing(fn ($state) => Hash::make($state))
                                ->dehydrated(fn ($state) => filled($state))
                                ->required(fn (string $context): bool => $context === 'create')
                                ->label('Mot de passe'),
                            Toggle::make('state')                            
                                ->onIcon('heroicon-m-bolt')
                                ->offIcon('heroicon-m-user')
                                ->onColor('success')
                                ->offColor('danger')
                                ->label('Actif')
                                ->inline(false),
                        ])
                        ->icon('heroicon-o-lock-closed')
                        ->columns(2)                
                ])
                ->columnSpan(['lg' => 2]),
image.png
Was this page helpful?