Soak the rice for 30 mins. Cook the rice following whichever method you prefer. We usually
cook rice for biryani
in an open pan but you can use the rice cooker or pressure cooker too. Just make sure the rice doesn't get overcooked. The grains need to remain separate.
Meanwhile, heat the ghee or oil in a wide pan and add the sliced onions along with the whole spices (cinnamon, cloves, bay leaf, cardamom, star anise). Fry the onions stirring frequently.
Grind or crush the garlic and ginger together. Add this to the frying onions and fry until the onions turn a dark golden brown. Drain and set aside. (If using carrots, add along with the ginger, etc and cook together).
In the same pan, fry the cashew nuts and raisins until golden. Drain and set aside with the fried onions.
Once the rice is done, mix it with the above onion mixture, add the fried raisins and cashew nuts on top and set aside.