01 - Melt butter in a large skillet over medium heat. Add sliced onions and cook, stirring frequently, until onions are soft and lightly golden, about 10-15 minutes.
02 - Add minced garlic to the caramelized onions and cook for 1 minute more until fragrant.
03 - Transfer the onions and garlic to the slow cooker. Add beef broth, white wine if using, thyme, bay leaf, salt, and pepper. Stir to combine all ingredients.
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 a baking sheet and toast until golden, 1-2 minutes per side.
06 - Ladle hot soup into oven-safe bowls. Top each with a toasted baguette slice and generous amount of Gruyère cheese. Place bowls on baking sheet and broil until cheese is bubbly and golden, 2-3 minutes.
07 - Serve immediately while hot, garnished with extra fresh thyme sprigs if desired.