refatbd / laravel-free-fire
Laravel integration for refatbd/free-fire-php.
v1.0.1
2026-08-02 01:17 UTC
Requires
- php: ^8.2
- illuminate/cache: ^11.0 || ^12.0 || ^13.0
- illuminate/console: ^11.0 || ^12.0 || ^13.0
- illuminate/contracts: ^11.0 || ^12.0 || ^13.0
- illuminate/http: ^11.0 || ^12.0 || ^13.0
- illuminate/routing: ^11.0 || ^12.0 || ^13.0
- illuminate/support: ^11.0 || ^12.0 || ^13.0
- refatbd/free-fire-php: ^1.0
Requires (Dev)
- orchestra/testbench: ^9.0 || ^10.0 || ^11.0
- phpunit/phpunit: ^11.0 || ^12.0
README
Laravel integration package for the Free Fire player information & official ASTC media rendering engine.
Generated distribution repository: development happens in
refatbd/free-fire-php-monorepo. Do not edit the split repository directly.
Installation
composer require refatbd/laravel-free-fire php artisan vendor:publish --tag=freefire-config php artisan freefire:media-check
Basic Usage
use Refatbd\LaravelFreeFire\Facades\FreeFire; // Retrieve player information (JSON array) $player = FreeFire::player('4422076728', 'BD'); // Access basic info and ranks echo $player['basicInfo']['nickname']; // ᴛᴀʙᴀꜱꜱᴜᴍ♡ʀ echo $player['basicInfo']['level']; // 67
Diagnostic & Media Capability Checker
Run the built-in Artisan diagnostic command to verify ASTC decoding and WebP media capability on your server:
php artisan freefire:media-check
Server Requirements & Media Engine Guidance
| Platform / Server Type | Recommended Setup |
|---|---|
| Ubuntu / Debian / VPS | sudo apt update && sudo apt install astc-encoder |
| cPanel / Shared Hosting | Leave FREEFIRE_ASTCENC_BINARY=astcenc; the core package auto-detects the bundled Linux decoder when proc_open is enabled |
| Windows Server / Local | Leave FREEFIRE_ASTCENC_BINARY=astcenc; the core package auto-detects the bundled Windows decoder |
Graceful Fallback Note: If
proc_openis disabled orastcencis missing on cheap shared hosting, player statistics and JSON API endpoints continue to work 100% reliably. Media rendering automatically degrades to PHP GD gradient graphics without crashing.
Protocol & Configuration
FREEFIRE_ENABLED=true FREEFIRE_DEFAULT_REGION=BD FREEFIRE_PROTOCOL=OB54 FREEFIRE_ASTCENC_BINARY=astcenc
API Routes
GET /api/free-fire/v1/healthGET /api/free-fire/v1/players/{uid}?region=BDGET /api/free-fire/v1/players/{uid}/avatar?region=BDGET /api/free-fire/v1/players/{uid}/banner?region=BD&raw=1(Clean background mode)GET /api/free-fire/v1/players/{uid}/banner?region=BD(Composited banner graphic mode)
Legacy Compatibility Routes
GET /player-info?uid={uid}®ion={region}GET /api/avatar/avatar_{uid}.webpGET /api/banner/banner_{uid}.webp