01 - Melt butter in a large skillet over medium heat. Add sliced onions and cook, stirring frequently, until soft and lightly golden, about 10-15 minutes.
02 - Stir in minced garlic and continue cooking for 1 minute until fragrant.
03 - Transfer caramelized onions and garlic to slow cooker. Pour in beef broth, white wine if using, thyme, bay leaf, salt, and pepper. Stir well to incorporate all flavors.
04 - Cover and cook on low setting for 6-8 hours until onions are deeply caramelized and flavors have fully melded. Remove and discard bay leaf before serving.
05 - About 20 minutes before serving, preheat broiler. Arrange baguette slices on baking sheet and toast until golden, approximately 1-2 minutes per side.
06 - Ladle hot soup into oven-safe bowls. Place toasted baguette slice on top of each portion and generously cover with Gruyère cheese.
07 - Position bowls on baking sheet and broil until cheese becomes bubbly and golden, about 2-3 minutes. Watch carefully to prevent burning.
08 - Serve immediately while hot, garnished with additional fresh thyme sprigs if desired.