New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

nicolaskion/eve

Esi Integration for EVE Online
4,276
Install
composer require nicolaskion/eve
Latest Version:v0.11
PHP:^8.3
Laravel:12 · 13
Older releases:10 · 11
License:MIT
Last Updated:Jul 17, 2026
Links: GitHub  ·  Packagist
Maintainer: NicolasKion

ESI Integration for EVE Online

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.

Features

  • 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 / EsiToken implementations
  • 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 EsiResult you inspect
  • Configurable retry policy with sensible defaults

Requirements

  • PHP 8.3+
  • Laravel 12 or 13

Installation

Install the package via composer:

composer require nicolaskion/eve

Publish 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-secret

The config file lets you tweak the user agent, retry policy, base URL and ESI compatibility date.

Usage

Public endpoints

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;

Resolving names and IDs

// 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;    // 30000142

Authenticated endpoints

Endpoints 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);

Error handling

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;
}

Coverage & compatibility

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.

Testing

composer test

Run the suite with coverage:

composer test-coverage

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.

Related Packages

barryvdh/laravel-httpcache

HttpCache for Laravel

413,362 502
shawnley/laravel-httpcache

HttpCache for Laravel 5

741 0
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443

Version History

Version Released PHP Laravel License
v0.11 ^8.3 ^12.0 || ^13.0 MIT
v0.10 ^8.3 ^12.0 || ^13.0 MIT
v0.9 ^8.3 ^12.0 || ^13.0 MIT
v0.8 ^8.3 ^12.0 || ^13.0 MIT
v0.7 ^8.3 ^12.0 || ^13.0 MIT