01 - Melt butter in a large skillet over medium heat. Add sliced onions and cook, stirring frequently, until soft and lightly golden, approximately 10-15 minutes.
02 - Stir in minced garlic and continue cooking for 1 minute until fragrant.
03 - Transfer onion mixture to slow cooker. Pour in beef broth, white wine if using, thyme, bay leaf, salt, and pepper. Stir thoroughly to incorporate all ingredients.
04 - Cover and cook on low setting for 6-8 hours until onions achieve deep caramelization and flavors have fully melded. Remove and discard bay leaf before serving.
05 - Preheat broiler 20 minutes before serving. Arrange baguette slices on baking sheet and toast until golden brown, approximately 1-2 minutes per side.
06 - Ladle hot soup into oven-safe bowls. Top each portion with toasted baguette slice and generous amount of Gruyère cheese. Place bowls on baking sheet and broil until cheese becomes bubbly and golden, about 2-3 minutes.
07 - Serve soup piping hot, garnished with additional fresh thyme sprigs if desired.