This commit is contained in:
Andras Bacsai
2023-06-12 22:02:10 +02:00
parent 6626795a99
commit bc79e142e5
8 changed files with 157 additions and 91 deletions

View File

@@ -68,4 +68,13 @@ class Team extends BaseModel implements SendsDiscord, SendsEmail
{
return $this->hasMany(TeamInvitation::class);
}
public function sources()
{
$sources = collect([]);
$github_apps = $this->hasMany(GithubApp::class)->whereisPublic(false)->get();
$gitlab_apps = $this->hasMany(GitlabApp::class)->whereisPublic(false)->get();
// $bitbucket_apps = $this->hasMany(BitbucketApp::class)->get();
$sources = $sources->merge($github_apps)->merge($gitlab_apps);
return $sources;
}
}