In any case of forcible entry and detainer, or detainer only, the court may tax as a part of the costs in the case, to the prevailing party, reasonable attorney fees, whether a trial is had or not, if prevailing party is represented by a licensed attorney.
SDCL 21-16-11