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 cook for 1 minute until fragrant.
03 - Transfer onion mixture to slow cooker. Add beef broth, white wine if using, thyme, bay leaf, salt, and pepper. Stir well to combine.
04 - Cover and cook on low for 6-8 hours until onions are deeply caramelized and flavors have melded. Remove and discard bay leaf.
05 - Preheat broiler about 20 minutes before serving. Arrange baguette slices on baking sheet and toast until golden, 1-2 minutes per side.
06 - Ladle hot soup into oven-safe bowls. Top each with toasted baguette slice and generous amount of Gruyère cheese.
07 - Place bowls on baking sheet and broil until cheese is bubbly and golden, 2-3 minutes.
08 - Serve hot, garnished with extra thyme sprigs if desired.