knplabs/github-api
Lightweight, well-tested PHP wrapper for GitHub APIs v3 (REST) and v4 (GraphQL). PSR-17/PSR-18 compatible via HTTPlug, with easy setup using Guzzle, Symfony HttpClient, or other PSR clients. Supports framework integrations (Laravel via graham-campbell/github).
$client = new Github\Client();
$organizationApi = $client->api('organization');
$paginator = new Github\ResultPager($client);
$parameters = array('github');
$result = $paginator->fetchAll($organizationApi, 'repositories', $parameters);
Parameters of the fetchAll method:
Parameters are passed to the API method via call_user_func_array.
$parameters = array('github', 'all', 1); // $organization, $type, $page
$client = new Github\Client();
$organizationApi = $client->api('organization');
$paginator = new Github\ResultPager( $client );
$parameters = array('github');
$result = $paginator->fetch($organizationApi, 'repositories', $parameters);
$paginator->hasNext();
$paginator->fetchNext();
$paginator->hasPrevious();
$paginator->fetchPrevious();
How can I help you explore Laravel packages today?