PHPackages                             michaelcrowcroft/espn-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. michaelcrowcroft/espn-laravel

ActiveLibrary[API Development](/categories/api)

michaelcrowcroft/espn-laravel
=============================

Fluent Laravel SDK for ESPN APIs using Saloon

02PHP

Since Aug 29Pushed 10mo agoCompare

[ Source](https://github.com/MichaelCrowcroft/espn-laravel)[ Packagist](https://packagist.org/packages/michaelcrowcroft/espn-laravel)[ RSS](/packages/michaelcrowcroft-espn-laravel/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

ESPN Laravel SDK (Saloon)
=========================

[](#espn-laravel-sdk-saloon)

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

[](#installation)

You can install the package via composer:

```
composer require michaelcrowcroft/espn-laravel
```

(Optional) You can publish the config file with:

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

Usage
-----

[](#usage)

```
use Espn\Facades\Espn;

// Athletes (Core v3)
$athletes = Espn::athletes()->page(page: 1, limit: 20000);
$mahomes  = Espn::athletes()->get(15864); // Example athlete ID

// Fantasy players (reads v3)
$playersAllOn     = Espn::fantasy()->allOn(2024); // view=allon
$konaInfo         = Espn::fantasy()->konaPlayerInfo(2024, limit: 2000);
$customFilter     = Espn::fantasy()->players(
    2024,
    'mLiveScoring',
    ['games' => ['limit' => 2000]] // becomes X-Fantasy-Filter header
);

// Saloon Response usage
$json = $athletes->json();
```

### Fluent Helpers for Fantasy (easy website stats)

[](#fluent-helpers-for-fantasy-easy-website-stats)

```
use Espn\Facades\Espn;

// Top actual scorers (weekly or overall best available)
$topWeekly = Espn::fantasy()->topScorers(year: 2024, week: 1, take: 25);

// Top projected scorers (weekly or best available projection)
$topProjected = Espn::fantasy()->topProjected(year: 2024, week: 2, take: 25);

// Trending by ownership change (best-effort from kona_player_info)
$trendingAdds  = Espn::fantasy()->trendingAdds(year: 2024, take: 25);
$trendingDrops = Espn::fantasy()->trendingDrops(year: 2024, take: 25);

// Each returns an array of simple player summaries:
// [
//   ['id' => 123, 'name' => 'Player Name', 'team' => 'KC', 'position' => 'TE', 'points' => 27.8],
//   ...
// ]

// Fluent query builder for more control
$query = Espn::fantasy()
    ->query(2024)
    ->positions(['RB', 'WR'])   // simple post-filter by position
    ->scoringPeriod(1)          // weekly focus
    ->limit(1500);              // X-Fantasy-Filter games.limit

$topRbwrs = $query->topScorers(take: 20);
```

Notes:

- The helpers use common ESPN views (mLiveScoring and kona\_player\_info) and return simple arrays for direct UI use.
- Trending methods are based on ownership change fields when provided by the API. If a dataset lacks ownership deltas, results may be empty.
- For full control, use `Espn::fantasy()->players(...)` with a custom X-Fantasy-Filter.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [:author\_name](https://github.com/:author_username)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11324235?v=4)[Michael Crowcroft](/maintainers/MichaelCrowcroft)[@MichaelCrowcroft](https://github.com/MichaelCrowcroft)

---

Top Contributors

[![MichaelCrowcroft](https://avatars.githubusercontent.com/u/11324235?v=4)](https://github.com/MichaelCrowcroft "MichaelCrowcroft (2 commits)")

### Embed Badge

![Health badge](/badges/michaelcrowcroft-espn-laravel/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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