where('service_security_id', '=', $service_security_id)->where('branch_id','=',$branch_id)->find(); } /** * 关联供应商表 */ public function branch() { return $this->belongsTo('app\\common\\model\\branch\\Branch', 'branch_id', 'branch_id'); } /** * 关联服务 */ public function server() { return $this->hasOne('app\\common\\model\\branch\\ServiceSecurity', 'service_security_id', 'service_security_id'); } }