API methods to handle teams and users (#1384)

This commit is contained in:
Kevin Papst
2020-01-28 22:28:31 +01:00
committed by GitHub
parent a31e027c54
commit 836a530b86
24 changed files with 1525 additions and 107 deletions

View File

@@ -144,6 +144,11 @@ class Team
return $this->users;
}
public function hasCustomer(Customer $customer): bool
{
return $this->customers->contains($customer);
}
public function addCustomer(Customer $customer)
{
if ($this->customers->contains($customer)) {
@@ -172,6 +177,11 @@ class Team
return $this->customers;
}
public function hasProject(Project $project): bool
{
return $this->projects->contains($project);
}
public function addProject(Project $project)
{
if ($this->projects->contains($project)) {