astrotomic/laravel-github-sponsors

1,557 9
Install
composer require astrotomic/laravel-github-sponsors
Latest Version:1.2.0
PHP:^8.0
Laravel:9 – 13
Older releases:7 · 8
License:MIT
Last Updated:Aug 13, 2026
Links: GitHub  ·  Packagist
Maintainer: Gummibeer

Laravel GitHub Sponsors

MIT License Latest Version PHP

Ecologi Larabelles opendor.me

GitHub Workflow Status GitHub Workflow Status Total Downloads

Retrieve the GitHub Sponsors of any user/organization and check if someone is sponsoring you.

Installation

composer require astrotomic/laravel-github-sponsors

Configuration

Set services.github.sponsors_token config value or override service binding in your own service provider. The used PAT needs at least read:user and read:org permissions to retrieve all sponsors.

$this->app->when(\Astrotomic\GithubSponsors\Graphql::class)
    ->needs('$token')
    ->give('my_custom_secret');

Usage

use Astrotomic\GithubSponsors\Facades\GithubSponsors;

// all sponsors for current authenticated user
GithubSponsors::viewer()->sponsors();
// all sponsors for given name without knowing what it is
GithubSponsors::login('larabelles')->sponsors();
// all sponsors for given user
GithubSponsors::user('Gummibeer')->sponsors();
// all sponsors for given organization
GithubSponsors::organization('Astrotomic')->sponsors();

// select specific attributes
GithubSponsors::viewer()->sponsors(['login', 'name', 'avatarUrl']);
// select specific attributes and company only for users
GithubSponsors::viewer()->sponsors(['login', 'name', 'avatarUrl'], ['company']);
// select specific attributes and email only for organizations
GithubSponsors::viewer()->sponsors(['login', 'name', 'avatarUrl'], [], ['email']);

// check if viewer sponsored by Gummibeer
GithubSponsors::viewer()->isSponsoredBy('Gummibeer');
// check if viewer sponsors Gummibeer
GithubSponsors::viewer()->isSponsoring('Gummibeer');
// check if viewer has sponsors
GithubSponsors::viewer()->hasSponsors();
// check how many sponsors the viewer has
GithubSponsors::viewer()->sponsorsCount();

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details. You could also be interested in CODE OF CONDUCT.

Security

If you discover any security related issues, please check SECURITY for steps to report it.

Credits

License

The MIT License (MIT). Please see License File for more information.

Treeware

You're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees at ecologi.com/astrotomic

Read more about Treeware at treeware.earth

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

598,760,099 34,966
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

403,217,078 4,664

Version History

Version Released PHP Laravel License
1.2.0 ^8.0 ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
1.1.0 ^8.0 ^9.0 || ^10.0 || ^11.0 || ^12.0 MIT
v1.0.0 ^8.0 ^8.0 || ^9.0 || ^10.0 MIT
0.4.0 ^7.4 || ^8.0 ^7.0 || ^8.0 || ^9.0 MIT
0.3.1 ^7.4 || ^8.0 ^7.0 || ^8.0 MIT
Pre-releases (2)
Version Released PHP Laravel License
1.0.0-rc.2 ^7.4 || ^8.0 ^7.0 || ^8.0 MIT
1.0.0-rc.1 ^7.4 || ^8.0 ^7.0 || ^8.0 MIT