A Laravel package that integrates EVE Online's ESI API into your application. Every ESI endpoint is wrapped in a typed request class and returns fully typed, readonly DTOs — no juggling raw JSON arrays.
- Complete ESI coverage — every endpoint in ESI's OpenAPI specification is implemented, pinned to a specific compatibility date per release
- Typed DTOs for every response — characters, corporations, alliances, assets, contracts, killmails, market data, industry, fleets, and more
- Automatic OAuth token refresh for authenticated endpoints via your own
Character/EsiTokenimplementations - Automatic pagination — multi-page endpoints are walked and merged into a single result set for you
- No exceptions on HTTP errors — every call returns a typed
EsiResultyou inspect - Configurable retry policy with sensible defaults
- PHP 8.3+
- Laravel 12 or 13
Install the package via composer:
composer require nicolaskion/evePublish the config file:
php artisan vendor:publish --tag="esi-config"Set your ESI application credentials (only needed for authenticated endpoints — create an app at developers.eveonline.com):
EVE_CLIENT_ID=your-client-id
EVE_CLIENT_SECRET=your-client-secretThe config file lets you tweak the user agent, retry policy, base URL and ESI compatibility date.
use NicolasKion\Esi\Facades\Esi;
$result = Esi::getStatus();
if ($result->wasSuccessful()) {
$result->data->players; // e.g. 24_512
}
$alliance = Esi::getAlliance(434243723)->data;
$history = Esi::getMarketHistory(region_id: 10000002, type_id: 44992)->data;// IDs to names
$names = Esi::getNames([95465499, 30000142])->data;
// Names to IDs, grouped by category
$ids = Esi::getIds(['CCP Bartender', 'Jita'])->data;
$ids->characters[0]->id; // 95465499
$ids->systems[0]->id; // 30000142Endpoints that require authentication accept a Character. Implement the
NicolasKion\Esi\Interfaces\Character and NicolasKion\Esi\Interfaces\EsiToken
interfaces on your models, and the package takes care of refreshing expired
access tokens for you:
$assets = Esi::getAssets($character)->data;
$contacts = Esi::getCharacterContacts($character)->data;
Esi::setWaypoint($character, destination_id: 30000142);Every call returns an EsiResult. Nothing throws on HTTP errors:
$result = Esi::getCharacter(95465499);
if ($result->failed()) {
$result->error->code; // e.g. 404
$result->error->body;
}This package implements every endpoint in ESI's OpenAPI specification, so
there is no per-endpoint table to keep in sync — if it exists in ESI, there is a
method for it. Method names follow the ESI operation they call
(getCharacter, getCorporationWalletJournal, getMarketOrders, search,
setWaypoint, …), and every one returns an EsiResult.
Each release is pinned to a specific ESI compatibility date, sent as the
X-Compatibility-Date header, so responses stay stable as ESI evolves. The
pinned date is configurable.
composer testRun the suite with coverage:
composer test-coveragePlease see CHANGELOG for more information on what has changed recently.
The MIT License (MIT). Please see License File for more information.