fkrzski/laravel-steam-api-sdk

Laravel bridge for fkrzski/php-steam-api-sdk — service provider, Steam facade and test fakes for the Steam Web API.
1,108
Install
composer require fkrzski/laravel-steam-api-sdk
Latest Version:0.6.0
PHP:^8.5.0
License:MIT
Last Updated:Sep 4, 2026
Links: GitHub  ·  Packagist
Maintainer: fkrzski

Laravel Steam API SDK

Banner of Laravel Steam API SDK

License Latest Version on Packagist Total Downloads Tests

Laravel bridge for fkrzski/php-steam-api-sdk. Ships a service provider, a Steam facade and a Steam::fake() test helper so you can talk to the Steam Web API the Laravel way.

It powers the player stats on Dead by Stats.

  • Auto-discovered SteamConnector binding, scoped per request and safe under Octane.
  • Rate-limit budget shared across processes through the Laravel cache store.
  • Fluent Steam facade with first-class request helpers.
  • Localised payloads follow your application locale, or the language you pin in config.
  • AsSteamId Eloquent cast, SteamIdRule validation rule and one-liner test fakes via Saloon's MockClient, with DTO factories for the payloads.

Requirements

  • PHP 8.5+
  • Laravel 13+

Installation

composer require fkrzski/laravel-steam-api-sdk

The service provider and Steam facade are auto-discovered. Run the installer to publish the config and store your key:

php artisan steam:install

It writes config/steam-api.php and asks for your Steam Web API key, appending it to .env. Both steps are also fine to do by hand:

php artisan vendor:publish --tag=steam-api-config
STEAM_API_KEY=your-steam-web-api-key

Quick start

use Fkrzski\LaravelSteamApiSdk\Facades\Steam;
use Fkrzski\SteamApiSdk\ValueObjects\SteamId;

$id = SteamId::fromSteamId64('76561198000000000');

$summaries    = Steam::summaries([$id]);
$bans         = Steam::bans([$id]);
$friends      = Steam::friends($id);
$groups       = Steam::groups($id);
$library      = Steam::ownedGames($id, appIdsFilter: [381210]);
$recentGames  = Steam::recentlyPlayedGames($id);
$level        = Steam::steamLevel($id);
$badges       = Steam::badges($id);
$quests       = Steam::communityBadgeProgress($id);
$stats        = Steam::userStats($id, appId: 381210);
$achievements = Steam::achievements($id, appId: 381210);
$playing      = Steam::currentPlayers(appId: 381210);
$globalStats  = Steam::globalAchievements(gameId: 381210);
$gameSchema   = Steam::schema(appId: 381210);
$resolvedId   = Steam::resolveVanityUrl('gabelogannewell');

Each helper returns a strongly-typed DTO from the underlying SDK — you never touch raw JSON.

Documentation

Full documentation lives at docs.fkrzski.dev/laravel-steam-api-sdk:

  • Guide — the SteamId value object, facade helpers, exceptions, and concurrent requests.
  • Configuration — the config file, your API key, and the cache-backed rate limit.
  • API reference — every facade method, its parameters, return type, and errors.
  • Eloquent cast — persist a Steam ID on a model with AsSteamId.
  • Route binding — opt in to resolving a {steamId} route parameter into a SteamId value object.
  • Validation rule — validate submitted Steam IDs with SteamIdRule.
  • Testing — fake the Steam Web API with Steam::fake().

License

MIT. See LICENSE.md.

Related Packages

bright-tech/laravel-aliyunoss-video-service

阿里云视频转码 laravel

2,852 0
edbizarro/laravel-facebook-ads

Facebook & Instagram Ads for Laravel 5.6

30,182 135
hkonnet/laravel-ebay

This package is wrapper for php Ebay sdk for laravel to automate all the configu...

53,063 39
sportbook/sdk

SportBook SDK PHP - Integration function

226 1