Peel the garlic and wash it. (It is easier to peel the skin off the garlic if you crush it first.)
Dice up the garlic using a knife. (Using a food processor will cut it too fine. I don’t recommend to use a tool like this. You only need 5 minutes to finish cutting the garlic by hand.)
Cut the green and red onions.
Heat the pan and pour 400ml oil into a pan. Add the star anise, bay leaves, green and red onions.
Warm over medium heat, and the oil will start to sizzle.
When the ingredients start to turn brown and fried, turn off the heat.
All the ingredients in the pot are removed.
Once the temperature of the oil drops, add the garlic.
Slowly bring the heat of the oil back up, using a spoon to keep stirring so as not to stick to the bottom.
Season with salt.
Stir even, turn off the heat.