PHPackages                             jeffersongoncalves/laravel-github-contributions - 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. [API Development](/categories/api)
4. /
5. jeffersongoncalves/laravel-github-contributions

ActiveLibrary[API Development](/categories/api)

jeffersongoncalves/laravel-github-contributions
===============================================

Fetch the GitHub contribution calendar for any login as a flat 0-4 heatmap-cell array, ready to render your own contribution heatmap.

v1.0.0(today)10MITPHPPHP ^8.2CI passing

Since Jun 20Pushed today1 watchersCompare

[ Source](https://github.com/jeffersongoncalves/laravel-github-contributions)[ Packagist](https://packagist.org/packages/jeffersongoncalves/laravel-github-contributions)[ GitHub Sponsors](https://github.com/jeffersongoncalves)[ RSS](/packages/jeffersongoncalves-laravel-github-contributions/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (7)Versions (3)Used By (0)

[![Laravel GitHub Contributions](https://raw.githubusercontent.com/jeffersongoncalves/laravel-github-contributions/master/art/jeffersongoncalves-laravel-github-contributions.png)](https://raw.githubusercontent.com/jeffersongoncalves/laravel-github-contributions/master/art/jeffersongoncalves-laravel-github-contributions.png)

Laravel GitHub Contributions
============================

[](#laravel-github-contributions)

[![Tests](https://github.com/jeffersongoncalves/laravel-github-contributions/actions/workflows/run-tests.yml/badge.svg)](https://github.com/jeffersongoncalves/laravel-github-contributions/actions/workflows/run-tests.yml)[![PHPStan](https://github.com/jeffersongoncalves/laravel-github-contributions/actions/workflows/phpstan.yml/badge.svg)](https://github.com/jeffersongoncalves/laravel-github-contributions/actions/workflows/phpstan.yml)[![Code Style](https://github.com/jeffersongoncalves/laravel-github-contributions/actions/workflows/fix-php-code-style-issues.yml/badge.svg)](https://github.com/jeffersongoncalves/laravel-github-contributions/actions/workflows/fix-php-code-style-issues.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/37e219ae4296accf513ce55496238c8d1580ab446bcf49c20c5e009b047f5a2f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d6769746875622d636f6e747269627574696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/laravel-github-contributions)[![Total Downloads](https://camo.githubusercontent.com/46a60b2eaf18e24fa5ec28c35a0d806c627426c9c78f9b0a098021543c0ffc38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d6769746875622d636f6e747269627574696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/laravel-github-contributions)[![License](https://camo.githubusercontent.com/fd4f13c53b1860d8fb42dd7fb31c387c5b2705a4b6aa99772561e43d64211e6b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d6769746875622d636f6e747269627574696f6e732e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Fetch the GitHub contribution calendar for any login as a **flat `0-4` heatmap-cell array** — ready to render your own contribution heatmap. The cells are ordered the same way GitHub renders the calendar: column-major (week-by-week, top→bottom), seven cells per week.

> This package returns raw heatmap-cell data. If you instead want ready-made profile SVG cards (stats, top languages, streaks, trophies), use [jeffersongoncalves/laravel-github-stats](https://github.com/jeffersongoncalves/laravel-github-stats).

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

[](#installation)

```
composer require jeffersongoncalves/laravel-github-contributions
```

Publish the config file (optional):

```
php artisan vendor:publish --tag="laravel-github-contributions-config"
```

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

[](#configuration)

Add to your `.env`:

```
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx
```

Create a [Personal Access Token](https://github.com/settings/tokens/new) with the `read:user` scope.

### Config Options

[](#config-options)

```
// config/github-contributions.php
return [
    // Falls back to config('services.github.token') when empty.
    'token' => env('GITHUB_TOKEN'),

    'user_agent' => env('GITHUB_CONTRIBUTIONS_USER_AGENT', 'laravel-github-contributions'),

    'timeout' => (int) env('GITHUB_CONTRIBUTIONS_TIMEOUT', 8),
];
```

Usage
-----

[](#usage)

```
use JeffersonGoncalves\GitHubContributions\GitHubContributions;

$data = GitHubContributions::fetch('jeffersongoncalves');

// [
//     'cells' => [0, 1, 0, 2, 4, 3, 0, ...], // list, 7 per week, column-major
//     'total' => 1234,                        // total contributions in the calendar window
// ]
```

Each value in `cells` is a contribution level mapped from GitHub's `contributionLevel` enum:

GitHub levelCell`NONE``0``FIRST_QUARTILE``1``SECOND_QUARTILE``2``THIRD_QUARTILE``3``FOURTH_QUARTILE``4`When no token is configured (neither `github-contributions.token` nor `services.github.token`) or the GitHub API request fails, `fetch()` returns `['cells' => [], 'total' => 0]`.

Testing
-------

[](#testing)

```
composer test
```

Static Analysis
---------------

[](#static-analysis)

```
composer analyse
```

Code Formatting
---------------

[](#code-formatting)

```
composer format
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/411493?v=4)[Jefferson Gonçalves](/maintainers/jeffersongoncalves)[@jeffersongoncalves](https://github.com/jeffersongoncalves)

---

Top Contributors

[![jeffersongoncalves](https://avatars.githubusercontent.com/u/411493?v=4)](https://github.com/jeffersongoncalves "jeffersongoncalves (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

composercontributionsgithubgithub-apigraphqljeffersongoncalveslaravellaravel-packagephplaravelgraphqlgithubprofilecalendarheatmapcontributionscontribution-graph

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jeffersongoncalves-laravel-github-contributions/health.svg)

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

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.7M64](/packages/spatie-laravel-responsecache)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M152](/packages/spatie-laravel-health)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

43140.3k](/packages/harris21-laravel-fuse)[ralphjsmit/laravel-glide

Auto-magically generate responsive images from static image files.

4923.6k5](/packages/ralphjsmit-laravel-glide)

PHPackages © 2026

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