
161 Cal.App.2d Supp. 853 (1958)
ROBERT A. JOHNSON, Respondent,
v.
MURRAY SILVER, Appellant.
California Court of Appeals. 
June 17, 1958.
 Robert E. Rosskopf for Appellant.
 Robert S. Butts for Respondents.
 SWAIN, J.
 This is an appeal from judgments for plaintiffs in two mechanics' lien actions, consolidated for trial and on appeal. The owner of the real property in question is the defendant and appellant Silver. He hired and paid the defendant Shirey to excavate the site for an apartment building. It is not questioned on this appeal that Shirey was not a licensed contractor and that he hired the plaintiffs (respondents) to haul away the dirt after he, Shirey, excavated it. The plaintiff Johnson used three of his own trucks in this hauling, one of which he drove himself. His other two trucks were driven by men he hired for that purpose. In that work the plaintiff Hough drove one truck which he owned. The defendant Shirey did not appeal. Two principal questions are involved: (1) Were the plaintiffs contractors or were they employees of Shirey with wages as their sole compensation? (2) Are they barred from recovery by the fact that Shirey was not licensed as a contractor?
 If the plaintiffs were contractors (or subcontractors) the judgments must be reversed because they did not plead and prove that they were contractors as required by Business and Professions Code, section 7031. But if Business and Professions Code, section 7053, applies, they are not required to have contractors' licenses. The latter section provides: "This chapter does not apply to any person who engages in the activities herein regulated, as an employee with wages as his sole compensation." Until 1949, this exception was part of section 7026.
 Plaintiffs claim they were employees of Shirey. They do not contend they were licensed as contractors. Their complaints allege that they orally agreed with Shirey to furnish labor and trucks for hauling away materials (dirt) from the real property in question. The court found these allegations were true. No issue was raised by the pleadings as to the precise character of the relationship whether employees or subcontractors--so no finding was made on that issue. The judgment is in harmony with the conclusion that plaintiffs were employees and the evidence supports that conclusion.
 [1] Appellant would have us hold that plaintiffs were subcontractors as a matter of law. This we cannot do. Johnson was to be paid by the hour for the use of each truck and [161 Cal.App.2d Supp. 855] driver. He paid the drivers and took care of unemployment, social security and other payroll deductions. There was nothing in the oral agreement which prevented Shirey from terminating it at will or prevented him from controlling the manner in which the work was done. The facts as to Hough were the same except that he had only one truck which he drove himself. Of course, he had no payroll deductions to make. In Powell v. Berg (1950), 99 Cal.App.2d 353, 354 [221 P.2d 743], the court held that the plaintiff was an employee although he not only performed services but also advanced money and furnished a truck. In Malvich v. Rockwell (1949), 91 Cal.App.2d 463 [205 P.2d 389], the plaintiff agreed to build a wharf for the defendant and for that purpose bought materials and hired laborers. He was held to be an employee. Andrew v. Conner (1951), 101 Cal.App.2d 621 [225 P.2d 943], holds that Business and Professions Code, sections 7026 and 7031 do not preclude the foreclosure of a mechanic's lien by one whose sole participation in the project was the rental of his men and equipment to the lienee. See also Denton v. Wiese (1956), 144 Cal.App.2d 175 [300 P.2d 746].
 [2] Nor is there any merit to appellant's claim that plaintiff Johnson's payment of social security, withholding taxes on laborers he hired, makes him a contractor as a matter of law. (Frugoli v. Conway (1950), 95 Cal.App.2d 518 [213 P.2d 76]. At page 520 the court said: "The question whether one is an independent contractor or an employee is largely one of fact depending on all the circumstances of the relations of the parties. When those circumstances disclose a mixed relation of employment, the finding of the trial court based on substantial and competent evidence cannot be disturbed."
 Volume 26, California Jurisprudence, 2d 401 (note): "In an action against an employer, when plaintiff has introduced evidence that he acted as an employee or agent of the defendant, the burden is on the defendant seeking to avoid liability on such ground to prove that plaintiff acted as an independent contractor. Malvich v. Rockwell, 91 Cal.App.2d 463, 205 P.2d 389."
 [3] As to the second question above, the plaintiffs are not barred from recovery by the fact that Shirey, the contractor, was not licensed. In Fraenkel v. Bank of America (1953), 40 Cal.2d 845, 848 [256 P.2d 569], the court said: "That law [Bus. & Prof.,  7026 and 7031] was enacted for the safety and protection of the public against imposition by persons inexperienced in contracting work, and for the prevention of [161 Cal.App.2d Supp. 856] fraudulent acts by contractors resulting in loss to subcontractors, materialmen, employees, and owners of structures. (Loving & Evans v. Blick, 33 Cal.2d 603, 609 [204 P.2d 23]; Franklin v. Nat C. Goldstone Agency, 33 Cal.2d 628, 632 [204 P.2d 37].)" [Italicizing of "employees" added.] After citing the above Fraenkel case the court said in Matchett v. Gould (1955), 131 Cal.App.2d 821, 829 [281 P.2d 524]: "When a subcontractor is placed in the class of those for whose protection the law was enacted, he is removed from the imputation of pari delicto (Hedlund v. Sutter Med. Serv. Co., 51 Cal.App.2d 327, 333 [124 P.2d 878]; Robertson v. Hyde, 58 Cal.App.2d 667, 672 [137 P.2d 703]; 12 Cal.Jur.2d,  103, p. 302), and thus enabled to maintain an action for recovery of what is justly due him."
 Nothing said about the Matchett case in Lewis & Queen v. N. M. Ball Sons (1957), 48 Cal.2d 141, 154 [308 P.2d 713], affects the statement just quoted as far as the case at bar is concerned.
 In Grant v. Weatherholt (1954), 123 Cal.App.2d 34, 43 [266 P.2d 185], re Business and Professions Code, section 7031, the court said: "The courts will not impose penalties for noncompliance in addition to those that are provided expressly or by necessary implication." See also Marshall v. Von Zumwalt (1953), 120 Cal.App.2d 807, 810 [262 P.2d 363]. In this case the court held that section 7031 merely prevents an unlicensed contractor from bringing or maintaining any action and therefore does not bar him from using as a defense, by way of offset, to an action by the owner for an indebtedness on a note, money which he claims due him on the contract. That case puts the emphasis on the words "bring or maintain any action." By like reasoning we put emphasis on the words "no person in the business or acting in the capacity of a contractor." That section thus does not bar employees of an unlicensed contractor from enforcing the mechanic's lien rights provided in Code of Civil Procedure, section 1181.
 Appellant also claims that the court erred in finding the plaintiffs were employees of appellant as well as of Shirey. In this they are correct.
 Each of the judgments is modified by striking therefrom the words "and Murray Silver" which appear on page 2, lines 2 and 3. The findings are modified by striking the words "Murray Silver, by and through said defendant's agent" from page 2, lines 19-20. Under Code of Civil Procedure, section [161 Cal.App.2d Supp. 857] 1181, the plaintiffs as employees of the contractor are entitled to a mechanic's lien against the real property in question.
 The judgments as thus modified are affirmed, costs to respondents.
 Bishop, P. J., concurred.
 DAVID, J.
 I must dissent. Though desirous, where the law permits, to construe provisions for mechanic's liens with the greatest liberality, the facts herein and the well-established law relating to the effect of void contracts, impel the conclusion, as we view it, that the mechanic's liens claimed do not exist.
 (1) California Constitution, article XX, section 15, provides: "Mechanics, materialmen, artisans, and laborers of every class, shall have a lien upon the property upon which they have bestowed labor or furnished material for the value of such labor done and material furnished; ..." As to creation of the lien this provision is self-executing (Miltimore v. Nofziger Bros. Lumber Co. (1907), 150 Cal. 790 [90 P. 114]). But the lien of "teamsters and draymen, ... and all persons ... bestowing ... necessary services ... or furnishing ... teams ..." is not created by the Constitutional section but by Code of Civil Procedure, section 1181. (Mendenhall v. Gray (1914), 167 Cal. 233 [139 P. 67]; Code Civ. Proc.,  1181.) We must therefore look to the codes to determine whether the absence of any legal contract between Silver and either of the plaintiffs, is overcome by any contract implied by law, creating a valid lien against Silver's premises under the circumstances disclosed here.
 (2) The findings that Robert A. Johnson and Dana E. Hough were employees of Murray Silver have no support in the evidence. The work performed by plaintiffs was not done at the instance of the owner, Silver, but of Shirey. Silver did not himself secure plaintiffs' services, as in Andrew v. Conner, supra (1951), 101 Cal.App.2d 621; and since Shirey could not have foreclosed a mechanic's lien (Albaugh v. Moss Construction Co. (1954), 125 Cal.App.2d 126 [269 P.2d 936]) neither may his subcontractors or employees, relying on his contract.
 Shirey was not licensed as required by law and his contract with Silver is not enforceable in court. (Bus. & Prof. Code,  7026, 7028, 7031; Gatti v. Highland Park Builders, Inc. (1946), 27 Cal.2d 687, 689 [166 P.2d 265]. Cf. Berka v. [161 Cal.App.2d Supp. 858] Woodward (1899), 125 Cal. 119 [57 P. 777, 73 Am.St.Rep. 31, 45 L.R.A. 420].) Silver paid Shirey for the work including that performed by Johnson and Hough, and may not recover back such payment. (Comet Theatre Enterprises v. Cartwright (1952), 195 F.2d 80.)
 Code of Civil Procedure, section 1181, states that there shall be a mechanic's lien for furnishing necessary services "whether done or furnished at the instance of the owner or of any person acting by his authority or under him, as contractor or otherwise."
 Code of Civil Procedure, section 1182, subd. (c), provides that every contractor, etc. having charge of the work of improvement "shall be held to be the agent of the owner." The trial court undoubtedly found Shirey to be Silver's agent as a matter of law pursuant to these sections. Are they applicable?
 (3) The contract being void for any purpose, no agency for the owner in securing plaintiff's services can be predicated upon it. (Hunt v. Douglas Lumber Co. (1933), 41 Ariz. 276 [17 P.2d 815, 820].) Though reaching such proper conclusion, a materialman was allowed to recover. It was held not to have constructive notice of the contractor's unlicensed status; and the owner was held estopped to assert the invalidity, having received the benefit of the work.
 The Arizona court refused to hold that the absence of the name of the contractor from the official register of contractors was constructive notice to anyone of the contractor's incapacity. (Hunt v. Douglas Lumber Co., supra, 17 P.2d at 820.)
 (4) In California, the plaintiffs dealing with Shirey, required to be licensed, were on notice of his status. (Civ. Code,  18, 19; Bus. & Prof. Code,  7011, 7017, 7075, 7080, 7081; cf. Meyer v. Selggio (1947), 80 Cal.App.2d 161, 164 [181 P.2d 690]; see Santa Barbara Lumber Co. v. Ross (1920), 183 Cal. 657 [192 P. 436]; Wheaton v. Nolan (1934), 3 Cal.App.2d 401 [39 P.2d 457].)
 (5) In California, no estoppel [or more properly stated, no quantum meruit] will lie, based upon benefits conferred, under a void contract. (Zottman v. City & County of San Francisco (1862), 20 Cal. 96, 106-108 [81 Am.Dec. 96]; Brown v. Brown (1935), 8 Cal.App.2d 364 [47 P.2d 352]; Fewel & Dawes v. Pratt (1941), 17 Cal.2d 85 [109 P.2d 650]; Walker v. Harbor Realty & Development Co. (1931), 214 Cal. 46 [3 P.2d 557]; Dool v. First Nat. Bank (1930), 209 Cal. 717 [290 P. 15]; Duntley v. Kagarise (1935), 10 Cal.App.2d [161 Cal.App.2d Supp. 859] 394 [52 P.2d 560]; Colby v. Title Ins. & Trust Co. (1911), 160 Cal. 632 [117 P. 913, Ann.Cas. 1913A 515, 35 L.R.A.N.S. 813]; Miller v. California Roofing Co. (1942), 55 Cal.App.2d 136, 143 [130 P.2d 740].) The test is whether the plaintiffs must rely on the illegal transaction to state a case against defendant. Since here they must, they have no causes of action against Silver or his property. (Kyne v. Kyne (1940), 16 Cal.2d 436 [106 P.2d 620]; Holm v. Bramwell (1937), 20 Cal.App.2d 332 [67 P.2d 114].)
 The statutory provisions concerning licensing are for the protection of both the workman and the owner from frauds of the contractor. (Fraenkel v. Bank of America, supra (1953), 40 Cal.2d 845, 848), and they both are equally entitled to protection under that law.
 The purpose of the licensing provisions of the Business and Professions Code could be defeated if the employees of the purported contractor are allowed to recover against the owner sums which would not be due at all except for the existence of the forbidden contract, of which they had at least constructive notice.
 (6) The enforcement of this public policy collides with that for securing payment for unpaid mechanics and materialmen. Were the invalidity declared only in relation to the legal enforceability of the contract between the parties (Bus. & Prof. Code,  7031; cf. C.I.T. Corp. v. Breckenridge (1944), 63 Cal.App.2d 198 [146 P.2d 271]), it might be urged that subcontractors would not be prevented from asserting that the unenforceable contract was voidable as to them, with enough legal vitality to make the contractor the owner's agent, in relation to the contractor's employees or subcontractors. (Code Civ. Proc.,  1182, subd. (c).) But such contracts are void for any purpose (Civ. Code,  1550, 1667, 1598; Holm v. Bramwell, supra (1937), 20 Cal.App.2d 332; cf. Spinney v. Griffith (1893), 98 Cal. 149 [32 P. 974]; San Francisco Pav. Co. v. Fairfield (1901), 134 Cal. 220, 224 [66 P. 255]).
 McClain v. Hutton (1900), 131 Cal. 132 [61 P. 273, 63 P. 182, 622], involved an owner- contractor's contract, void because not recorded as then required by Code of Civil Procedure, section 1184. The claim of lien in that case was not sustained. At that time Code of Civil Procedure, section 1184 also provided that in such cases, labor and material furnished should "be deemed to have been done and furnished at the personal instance of the owner." There are no such statutory declarations now in reference to void contracts. In C.I.T. [161 Cal.App.2d Supp. 860] Corp. v. Breckenridge, supra (1944), 63 Cal.App.2d 198, liability to the bona fide holder of a note securing payment to an unlicensed contractor without notice of his disability was enforced. But there is no such doctrine as to subcontractors who are legally on constructive notice of the want of capacity of their employer, the contractor, to bind the owner. Neither plaintiff can recover without relying on the illegal contract.
 Judgment for Hough and Johnson in the respective cases providing mechanic's liens and for foreclosure thereof should be reversed.
