Code of Civil Procedure § 730
CHAPTER 1. Actions for the Foreclosure of Mortgages
In all cases of foreclosure of mortgage the attorney’s fee shall be fixed by the court in which the proceedings are had, any stipulation in the mortgage to the contrary notwithstanding.