feat: product team members

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Doar Mihai
2026-10-17 16:04:25 +03:00
co-authored by Claude Sonnet 5.5
parent 768c814762
commit fbb4862454
11 changed files with 321 additions and 5 deletions
+11
View File
@@ -138,6 +138,17 @@ class Product extends Model
return $this->hasMany(PricingPlan::class)->orderBy('position')->orderBy('id');
}
/**
* Get the team members of the product (besides the submitter).
*/
public function members(): BelongsToMany
{
return $this->belongsToMany(User::class, 'product_members')
->withPivot('role')
->withTimestamps()
->orderBy('product_members.id');
}
/**
* Get the user that owns the product.
*/