标签关系

This commit is contained in:
2025-03-27 11:13:46 +08:00
parent 6e79dd47c4
commit aff152e40d
7 changed files with 90 additions and 5 deletions
+4
View File
@@ -48,4 +48,8 @@ class Tag extends Model
return $this->belongsTo(TagGroup::class, 'group_id', 'id');
}
public function customers()
{
return $this->belongsToMany(Customer::class, 'customer_tag', 'tag_id', 'customer_id');
}
}