01 - In a large skillet over medium heat, melt the butter. Add sliced onions and cook, stirring frequently, until onions are soft and lightly golden, about 10-15 minutes.
02 - Add garlic to the 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 for 6-8 hours until onions are deeply caramelized and flavors have 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 a generous amount of Gruyère cheese.
07 - Place bowls on a baking sheet and broil until cheese is bubbly and golden, 2-3 minutes. Watch carefully to prevent burning.
08 - Serve hot, garnished with extra thyme if desired.