Peanuts and cashews and almonds can cause and anaphlactic like response so avoid them for sure. May be a chemical response. This is what happens with pollens and cat dander. The treatment is different depending on the mechanism of response. Only approach is either to avoid the foods completely or treat the inflammation that occurs in response to exposure with an anti-inflammatory agent.
Allergies play a significant role in making asthma worse.
But allergy occurs without asthma and asthma occurs without allergies. Sometimes they both occur together. Some people with significant allergy to inhaled allergens will get nasal and sinus inflammation and this will make asthma worse and harder to control. The nasal inflammation reflects the presence of inflammatory cells in the upper airway. Use anti-histamines and nasal steroids for upper airway responses.