-
app/Services/GitHub/GitHubApi.php
Open in GitHubuse Github\ResultPager; class GitHubApi { // public function fetchPublicRepositories(string $username): Collection { $api = $this->client->api('organization'); $paginator = new ResultPager($this->client); $repositories = $paginator->fetchAll($api, 'repositories', [$username]); return collect($repositories)->filter(function ($repo): bool { return $repo['private'] === false; }); } // }