The Laravel bridge for fkrzski/php-steam-api-sdk: a service provider, a fluent Steam facade, and a Steam::fake() test helper for the Steam Web API — no connector wiring, no raw JSON. It powers the player stats on Dead by Stats.

  • Auto-discovered facade — the Steam facade and its SteamConnector binding register themselves, scoped per request and safe under Octane.
  • Shared rate limits — Steam’s daily quota, or limits of your own, counted in a Laravel cache store you pick, so every process draws on one counter.
  • Timeouts and retries — set in the config file; Steam unreachable or answering a 5xx is tried again, every other failure is thrown at once.
  • Pluggable sender — requests go out through Guzzle, reported to Nightwatch while it is enabled, or through any Saloon sender the container builds.
  • Queue middleware — RespectsSteamRateLimit releases a job until the spent limit’s window resets rather than letting it fail.
  • Fluent resources — Steam::users()->summaries(), Steam::players()->ownedGames() and the rest return typed DTOs, and Steam::newsFeed() pages an app’s news lazily.
  • Locale-aware language — localised payloads follow app()->getLocale() through Steam’s own language codes, or the one you pin in the config file.
  • Eloquent cast — AsSteamId stores a Steam ID on a model and reads it back as a SteamId value object.
  • Route binding — opt in and a {steamId} route parameter arrives as a SteamId, with a 404 on unresolvable input.
  • Events and logging — every Steam request, response and failure is a Laravel event, and a log channel you name records the failures.
  • Renderable exceptions — an unhandled Steam failure answers with the status it maps to, and never with the one Steam sent for a key of yours it rejected.
  • Validation rule — SteamIdRule validates a submitted ID or profile URL without touching the API.
  • One-liner fakes — Steam::fake()->users()->summaries() fakes an endpoint the way your code calls it, with DTO factories for the payloads, and Steam::assertSent() for the requests that went out.
  • PHP 8.5+
  • Laravel 13+
  1. Pull the package in — the service provider and facade are auto-discovered:

    Terminal window
    composer require fkrzski/laravel-steam-api-sdk
  2. Publish the config and store your key:

    Terminal window
    php artisan steam:install
  3. Check what the package sees:

    Terminal window
    php artisan about --only=steam_api
use Fkrzski\LaravelSteamApiSdk\Facades\Steam;
use Fkrzski\SteamApiSdk\ValueObjects\SteamId;
$id = SteamId::fromSteamId64('76561198000000000');
$summaries = Steam::users()->summaries([$id]);
echo $summaries[0]->personaName;

Every resource sends its request through the shared connector and hands back the readonly DTO — you never touch the Saloon response.