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 - Move the caramelized onions and garlic to the slow cooker. Pour in beef broth, white wine if using, thyme, bay leaf, salt, and pepper. Stir everything together.
04 - Cover and cook on low heat for 6-8 hours until onions are deeply caramelized and flavors have fully melded. Remove and discard the bay leaf.
05 - About 20 minutes before serving, preheat your broiler. Arrange baguette slices on a baking sheet and toast until golden brown, about 1-2 minutes per side.
06 - Ladle hot soup into oven-safe bowls. Top each bowl with a toasted baguette slice and a generous layer of shredded Gruyère cheese. Place bowls on a baking sheet under the broiler until cheese is melted, bubbly, and golden, about 2-3 minutes.
07 - Serve immediately while hot, garnished with additional fresh thyme leaves if desired.