1. Melt the butter in a medium saucepan over medium-low heat and add the minced garlic. Cook to infuse the garlic flavor into the butter and until the butter turns brown, about 15 minutes. Remove from the heat and strain.
2. Lay out 4 slices of the bread on a work surface. Layer each with 1 slice of the cheese, some ham and then some of the cornichons. Top with 1 more slice of cheese. Close the sandwiches with the remaining bread and brush with butter until fully coated on both sides.
3. Place 2 sandwiches into a medium frying pan over medium heat. Cover the frying pan with a lid and cook until the bread is evenly golden brown, about 2 minutes. Flip, cover again and cook until the bread is golden brown and the cheese is visibly melted, about 2 minutes more. Repeat with the remaining sandwiches. If desired, rub the outside of the toasted bread with the garlic halves to add a little more garlic flavor.