feat: product team members
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
768c814762
commit
fbb4862454
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user