hasMany(CustomerLog::class,'customer_id','id'); } public function owners() { //子项目 return $this->hasMany(Owner::class,"customer_id","id"); } public function tags() { //标签 return $this->belongsToMany(CustomerTag::class,"customer_tag_customer"); } }