Heat a little oil in a pan and gently sauté the onions and garlic for 10 minutes until soft – do not brown or frizzle them. Add the white wine and stock, gently bring to a simmer, then remove from the heat.
Toast the slices of bread. Slice the tomatoes and roughly tear the basil. Rub a shallow ovenproof dish with a little olive oil. Cover the base with a layer of toasted bread topped with sliced tomato, basil, cheese and seasoning. Repeat until all the ingredients are used except for 100g cheese. Pour the onion and wine over the bread and top with the remaining cheese.