Peel and slice the onions. Clean and chop the broccoli.
Put the onion slices with olive oil and the crushed garlic cloves in a pan over a low heat. Then add the broccoli and fry with the lid closed. Season to taste with salt and pepper. Whenever the broccoli starts to set, deglaze with a little water.
The broccoli takes about 10 minutes - so it still has a bit of bite. If you prefer it soft, you can simply leave it in the pan.