PHPackages                             kobermeit/github - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. kobermeit/github

ActiveLibrary[Framework](/categories/framework)

kobermeit/github
================

GitHub Is A GitHub Bridge For Laravel 5

v5.1.0(9y ago)01.5kMITPHPPHP &gt;=5.5.9

Since Jul 27Pushed 9y ago1 watchersCompare

[ Source](https://github.com/kobermeit/Laravel-GitHub)[ Packagist](https://packagist.org/packages/kobermeit/github)[ RSS](/packages/kobermeit-github/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (9)Versions (19)Used By (0)

Laravel GitHub
==============

[](#laravel-github)

Laravel GitHub was created by, and is maintained by [Graham Campbell](https://github.com/GrahamCampbell), and is a [PHP GitHub API](https://github.com/KnpLabs/php-github-api) bridge for [Laravel 5](http://laravel.com). It utilises my [Laravel Manager](https://github.com/GrahamCampbell/Laravel-Manager) package. Feel free to check out the [change log](CHANGELOG.md), [releases](https://github.com/GrahamCampbell/Laravel-GitHub/releases), [license](LICENSE), and [contribution guidelines](CONTRIBUTING.md).

[![Laravel GitHub](https://cloud.githubusercontent.com/assets/2829600/4432305/c14a3934-468c-11e4-8371-684e72291139.PNG)](https://cloud.githubusercontent.com/assets/2829600/4432305/c14a3934-468c-11e4-8371-684e72291139.PNG)

[![StyleCI Status](https://camo.githubusercontent.com/b9e912f126a35ccea7db6ed45f461a966cfb516c911af7368fee20caa68d77b5/68747470733a2f2f7374796c6563692e696f2f7265706f732f32323238383836392f736869656c64)](https://styleci.io/repos/22288869)[![Build Status](https://camo.githubusercontent.com/a188709e144c47ef95426d8ca0374702e240c2535185e8878e1068fc759329cc/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f47726168616d43616d7062656c6c2f4c61726176656c2d4769744875622f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/GrahamCampbell/Laravel-GitHub)[![Coverage Status](https://camo.githubusercontent.com/c0bb307e0e152bdbe0e9851c3d79295eaade70763e0c63a82d521b319941f65a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f47726168616d43616d7062656c6c2f4c61726176656c2d4769744875622e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/GrahamCampbell/Laravel-GitHub/code-structure)[![Quality Score](https://camo.githubusercontent.com/6dc4bef2aec4ed73217d83c2608372a35d4c6a1290743242d8a4d2ef6929715f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f47726168616d43616d7062656c6c2f4c61726176656c2d4769744875622e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/GrahamCampbell/Laravel-GitHub)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Latest Version](https://camo.githubusercontent.com/06a729a772ca88bf7662f241a00dae6c9e724bb098072a753e6c3a7db4cb5338/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f47726168616d43616d7062656c6c2f4c61726176656c2d4769744875622e7376673f7374796c653d666c61742d737175617265)](https://github.com/GrahamCampbell/Laravel-GitHub/releases)

Installation
------------

[](#installation)

Either [PHP](https://php.net) 5.5+ or [HHVM](http://hhvm.com) 3.6+ are required.

To get the latest version of Laravel GitHub, simply require the project using [Composer](https://getcomposer.org):

```
$ composer require graham-campbell/github php-http/guzzle6-adapter
```

As an example, I've used the `php-http/guzzle6-adapter`, but you may install any package that "provides" `php-http/client-implementation`.

Instead, you may of course manually update your require block and run `composer update` if you so choose:

```
{
    "require": {
        "graham-campbell/github": "^5.0",
        "php-http/guzzle6-adapter": "^1.1"
    }
}
```

You will also need to install `madewithlove/illuminate-psr-cache-bridge` if you'd like to use caching.

Once Laravel GitHub is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key.

- `'GrahamCampbell\GitHub\GitHubServiceProvider'`

You can register the GitHub facade in the `aliases` key of your `config/app.php` file if you like.

- `'GitHub' => 'GrahamCampbell\GitHub\Facades\GitHub'`

Configuration
-------------

[](#configuration)

Laravel GitHub requires connection configuration.

To get started, you'll need to publish all vendor assets:

```
$ php artisan vendor:publish
```

This will create a `config/github.php` file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

There are two config options:

##### Default Connection Name

[](#default-connection-name)

This option (`'default'`) is where you may specify which of the connections below you wish to use as your default connection for all work. Of course, you may use many connections at once using the manager class. The default value for this setting is `'main'`.

##### GitHub Connections

[](#github-connections)

This option (`'connections'`) is where each of the connections are setup for your application. Example configuration has been included, but you may add as many connections as you would like. Note that the 3 supported authentication methods are: `"application"`, `"password"`, and `"token"`.

Usage
-----

[](#usage)

##### GitHubManager

[](#githubmanager)

This is the class of most interest. It is bound to the ioc container as `'github'` and can be accessed using the `Facades\GitHub` facade. This class implements the `ManagerInterface` by extending `AbstractManager`. The interface and abstract class are both part of my [Laravel Manager](https://github.com/GrahamCampbell/Laravel-Manager) package, so you may want to go and checkout the docs for how to use the manager class over at [that repo](https://github.com/GrahamCampbell/Laravel-Manager#usage). Note that the connection class returned will always be an instance of `\Github\Client`.

##### Facades\\GitHub

[](#facadesgithub)

This facade will dynamically pass static method calls to the `'github'` object in the ioc container which by default is the `GitHubManager` class.

##### GitHubServiceProvider

[](#githubserviceprovider)

This class contains no public methods of interest. This class should be added to the providers array in `config/app.php`. This class will setup ioc bindings.

##### Real Examples

[](#real-examples)

Here you can see an example of just how simple this package is to use. Out of the box, the default adapter is `main`. After you enter your authentication details in the config file, it will just work:

```
use GrahamCampbell\GitHub\Facades\GitHub;
// you can alias this in config/app.php if you like

GitHub::me()->organizations();
// we're done here - how easy was that, it just works!

GitHub::repo()->show('GrahamCampbell', 'Laravel-GitHub');
// this example is simple, and there are far more methods available
```

The github manager will behave like it is a `\Github\Client` class. If you want to call specific connections, you can do with the `connection` method:

```
use GrahamCampbell\GitHub\Facades\GitHub;

// the alternative connection is the other example provided in the default config
GitHub::connection('alternative')->me()->emails()->add('foo@bar.com');

// now we can see the new email address in the list of all the user's emails
GitHub::connection('alternative')->me()->emails()->all();
```

With that in mind, note that:

```
use GrahamCampbell\GitHub\Facades\GitHub;

// writing this:
GitHub::connection('main')->issues()->show('GrahamCampbell', 'Laravel-GitHub', 2);

// is identical to writing this:
GitHub::issues()->show('GrahamCampbell', 'Laravel-GitHub', 2);

// and is also identical to writing this:
GitHub::connection()->issues()->show('GrahamCampbell', 'Laravel-GitHub', 2);

// this is because the main connection is configured to be the default
GitHub::getDefaultConnection(); // this will return main

// we can change the default connection
GitHub::setDefaultConnection('alternative'); // the default is now alternative
```

If you prefer to use dependency injection over facades like me, then you can easily inject the manager like so:

```
use GrahamCampbell\GitHub\GitHubManager;
use Illuminate\Support\Facades\App; // you probably have this aliased already

class Foo
{
    protected $github;

    public function __construct(GitHubManager $github)
    {
        $this->github = $github;
    }

    public function bar()
    {
        $this->github->issues()->show('GrahamCampbell', 'Laravel-GitHub', 2);
    }
}

App::make('Foo')->bar();
```

For more information on how to use the `\Github\Client` class we are calling behind the scenes here, check out the docs at , and the manager class at .

##### Further Information

[](#further-information)

There are other classes in this package that are not documented here. This is because they are not intended for public use and are used internally by this package.

Security
--------

[](#security)

If you discover a security vulnerability within this package, please send an e-mail to Graham Campbell at . All security vulnerabilities will be promptly addressed.

License
-------

[](#license)

Laravel GitHub is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 98.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~52 days

Total

18

Last Release

3467d ago

Major Versions

v0.1.1-alpha → v1.0.02014-10-19

v1.0.1 → v2.0.02015-02-05

v2.0.0 → v3.0.02015-02-17

v3.2.0 → v4.0.02015-06-26

v4.4.2 → v5.0.02016-12-11

PHP version history (2 changes)v0.1.0-alphaPHP &gt;=5.4.7

v3.1.0PHP &gt;=5.5.9

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13191327?v=4)[Kurt](/maintainers/kobermeit)[@kobermeit](https://github.com/kobermeit)

---

Top Contributors

[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (172 commits)")[![driesvints](https://avatars.githubusercontent.com/u/594614?v=4)](https://github.com/driesvints "driesvints (1 commits)")[![jbrooksuk](https://avatars.githubusercontent.com/u/246103?v=4)](https://github.com/jbrooksuk "jbrooksuk (1 commits)")[![jrean](https://avatars.githubusercontent.com/u/5646128?v=4)](https://github.com/jrean "jrean (1 commits)")

---

Tags

frameworklaravelgithubGraham CampbellGrahamCampbellBridgephp-github-apigithub bridgeLaravel GitHub

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kobermeit-github/health.svg)

```
[![Health](https://phpackages.com/badges/kobermeit-github/health.svg)](https://phpackages.com/packages/kobermeit-github)
```

###  Alternatives

[graham-campbell/github

GitHub Is A GitHub Bridge For Laravel

6451.8M21](/packages/graham-campbell-github)[graham-campbell/digitalocean

DigitalOcean Is A DigitalOcean Bridge For Laravel

504357.0k2](/packages/graham-campbell-digitalocean)[graham-campbell/gitlab

GitLab Is A GitLab Bridge For Laravel

142610.0k2](/packages/graham-campbell-gitlab)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.1k91.3M282](/packages/laravel-horizon)[graham-campbell/markdown

Markdown Is A CommonMark Wrapper For Laravel

1.3k7.4M65](/packages/graham-campbell-markdown)[graham-campbell/manager

Manager Provides Some Manager Functionality For Laravel

39422.1M143](/packages/graham-campbell-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
