A developer has secured a $12 million loan in connection with a new 61-unit apartment building in the Somerset section of Franklin, brokers with JLL announced Thursday.