(a) It shall be lawful for any person having performed or furnished labor or material, or both, to an amount exceeding $25 in or for the erection, alteration or repair of any structure, in pursuance of any contract, express or implied, with the owners of such structure or with the agent of such owner or with any contractor who has contracted for the erection, alteration or repair of the same and for the furnishing of the whole or any part of the materials therefor, including any person who has performed or furnished labor or material, or both, for or at such structure under a contract with or order from any subcontractor to obtain a lien upon such structure and upon the ground upon which the same may be situated or erected.
(b) Liens may also be obtained in connection with: