PHPackages                             slvler/balldontlie-laravel - 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. slvler/balldontlie-laravel

ActiveLibrary[API Development](/categories/api)

slvler/balldontlie-laravel
==========================

balldontlie API wrapper for Laravel

v1.0.2(1y ago)1025MITPHPPHP ^8.0.2

Since Jun 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/slvler/balldontlie-service)[ Packagist](https://packagist.org/packages/slvler/balldontlie-laravel)[ Docs](https://github.com/slvler/balldontlie-service)[ RSS](/packages/slvler-balldontlie-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

balldontlie Service
===================

[](#balldontlie-service)

[![tests](https://github.com/slvler/balldontlie-service/actions/workflows/tests.yml/badge.svg)](https://github.com/slvler/balldontlie-service/actions/workflows/tests.yml)[![Latest Stable Version](https://camo.githubusercontent.com/2bf7ed81800491f4455a331315134e2ae1c44ee955d2cefc47954ab6b69e9b6f/68747470733a2f2f706f7365722e707567782e6f72672f736c766c65722f62616c6c646f6e746c69652d6c61726176656c2f76)](https://packagist.org/packages/slvler/balldontlie-laravel)[![Latest Unstable Version](https://camo.githubusercontent.com/6d7c551d54e6b495c1e09275a555b98ad64decc40215b281e73ece4c2f91c985/68747470733a2f2f706f7365722e707567782e6f72672f736c766c65722f62616c6c646f6e746c69652d6c61726176656c2f762f756e737461626c65)](https://packagist.org/packages/slvler/balldontlie-laravel)[![License](https://camo.githubusercontent.com/a09ff88052025862e17a661dcc7c5e8d799bd03bdb37e639bd7fb6802a226900/68747470733a2f2f706f7365722e707567782e6f72672f736c766c65722f62616c6c646f6e746c69652d6c61726176656c2f6c6963656e7365)](https://packagist.org/packages/slvler/balldontlie-laravel)[![Total Downloads](https://camo.githubusercontent.com/d89ae18b7b853046d2d8866de11470611dc10e41a8625c0967435e36cce47f8b/68747470733a2f2f706f7365722e707567782e6f72672f736c766c65722f62616c6c646f6e746c69652d6c61726176656c2f646f776e6c6f616473)](https://packagist.org/packages/slvler/balldontlie-laravel)

This package provides a convenient wrapper to the [Balldontlie API](https://www.balldontlie.io/home.html#introduction) for Laravel applications.

Requirements
------------

[](#requirements)

- PHP 8.0+
- Laravel 9.x

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

[](#installation)

To install this package tou can use composer:

```
composer require slvler/balldontlie-laravel
```

Usage
-----

[](#usage)

#### Find player

[](#find-player)

```
Balldontlie::players(237);
```

it returns an json with player:

```
{
  "data":[
    {
      "id":237,
      "first_name":"LeBron",
      "last_name":"James",
      "position":"F",
      "height_feet": 6,
      "height_inches": 8,
      "weight_pounds": 250,
      "team":{
        "id":14,
        "abbreviation":"LAL",
        "city":"Los Angeles",
        "conference":"West",
        "division":"Pacific",
        "full_name":"Los Angeles Lakers",
        "name":"Lakers"
      }
    }
 ],
 "meta": {
    "total_pages": 50,
    "current_page": 1,
    "next_page": 2,
    "per_page": 25,
    "total_count": 9999
  }
}
```

#### Find team

[](#find-team)

```
Balldontlie::teams(14);
```

it returns an json with team:

```
{
  "data": [
    {
      "id":14,
      "abbreviation":"LAL",
      "city":"Los Angeles",
      "conference":"West",
      "division":"Pacific",
      "full_name":"Los Angeles Lakers",
      "name":"Lakers"
    }
  ],
  "meta": {
    "total_pages": 1,
    "current_page": 1,
    "next_page": null,
    "per_page": 30,
    "total_count": 30
  }
}
```

#### Find games

[](#find-games)

```
Balldontlie::games(1);
```

it returns an json with games:

```
{
  "data": [
    {
      "id":1,
      "date":"2018-10-16T00:00:00.000Z",
      "home_team_score":105,
      "visitor_team_score":87,
      "season":2018,
      "period": 4,
      "status": "Final",
      "time": " ",
      "postseason": false,
      "home_team":{
        "id":2,
        "abbreviation":"BOS",
        "city":"Boston",
        "conference":"East",
        "division":"Atlantic",
        "full_name":"Boston Celtics",
        "name":"Celtics"
      },
      "visitor_team":{
        "id":23,
        "abbreviation":"PHI",
        "city":"Philadelphia",
        "conference":"East",
        "division":"Atlantic",
        "full_name":"Philadelphia 76ers",
        "name":"76ers"
      }
    }
  ],
  "meta": {
    "total_pages": 1877,
    "current_page": 1,
    "next_page": 2,
    "per_page": 25,
    "total_count": 46911
  }
}
```

#### Find stats

[](#find-stats)

```
Balldontlie::stats();
```

it returns an json with stats:

```
{
  "data": [
    {
      "id":29,
      "ast":2,
      "blk":2,
      "dreb":8,
      "fg3_pct":0.25,
      "fg3a":4,
      "fg3m":1,
      "fg_pct":0.429,
      "fga":21,
      "fgm":9,
      "ft_pct":0.8,
      "fta":5,
      "ftm":4,
      "game":{
        "id":1,
        "date":"2018-10-16T00:00:00.000Z",
        "home_team_id":2,
        "home_team_score":105,
        "season":2018,
        "visitor_team_id":23,
        "visitor_team_score":87
      },
      "min":"36:49",
      "oreb":2,
      "pf":3,
      "player":{
        "id":145,
        "first_name":"Joel",
        "last_name":"Embiid",
        "position":"F-C",
        "team_id":23
      },
      "pts":23,
      "reb":10,
      "stl":1,
      "team":{
        "id":23,
        "abbreviation":"PHI",
        "city":"Philadelphia",
        "conference":"East",
        "division":"Atlantic",
        "full_name":"Philadelphia 76ers",
        "name":"76ers"
      },
      "turnover":5
    }
  ],
  "meta": {
    "total_pages": 2042,
    "current_page": 1,
    "next_page": 2,
    "per_page": 25,
    "total_count": 51045
  }
}
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [slvler](https://github.com/slvler)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/slvler/balldontlie-service/blob/main/LICENSE.md) for more information.

Contributing
------------

[](#contributing)

You're very welcome to contribute. Please see [CONTRIBUTING](https://github.com/slvler/balldontlie-service/blob/main/CONTRIBUTING.md) for details.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~238 days

Total

3

Last Release

570d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ab8128832fb3e8a0d513453a903d7c49475f5f89dbf7ec39cf1d0518026b7ea?d=identicon)[slvler](/maintainers/slvler)

---

Top Contributors

[![selviler](https://avatars.githubusercontent.com/u/56368718?v=4)](https://github.com/selviler "selviler (7 commits)")

---

Tags

apiapi-clientapi-serviceballdontlieballdontlie-apilaravellaravel-packagelaravel-servicephplaravelballdontlie

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/slvler-balldontlie-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/slvler-balldontlie-laravel/health.svg)](https://phpackages.com/packages/slvler-balldontlie-laravel)
```

###  Alternatives

[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)[madeitbelgium/wordpress-php-sdk

WordPress Laravel PHP SDK

4422.9k1](/packages/madeitbelgium-wordpress-php-sdk)[gufy/whmcs

WHMCS API for Laravel 5

201.7k](/packages/gufy-whmcs)

PHPackages © 2026

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