Line a baking sheet with a silicone mat and preheat your oven to 325 degrees F.
Cut the brioche into 8 thick slices. Lay out 4 slices and top with the sliced or shredded gruyere.
Next, top the cheese with the ham slices and a spoonful of bechamel. Top with the other brioche slices.
Gently spread the top side of brioche with the softened butter.
Preheat a large nonstick pan over medium low - medium heat. Place the brioche sandwiches into the pan with the buttered side down. While the brioche is browning, butter the second side of the brioche.
Cook for about 2 minutes, or when the bottom is golden. Once golden, flip the sandwich over and brown the other side.
Once the second side has browned, remove from the pan and place on the prepared baking sheet.
Top each sandwich with 2 tablespoons of béchamel and 1 tablespoon of parmesan cheese.
Place in the oven to melt the cheese, about 5 minutes.
Remove from the oven, top each sandwich with a fried egg and serve immediately!