PHPackages                             izaghar/xivapi-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. izaghar/xivapi-laravel

ActiveLibrary[API Development](/categories/api)

izaghar/xivapi-laravel
======================

Laravel integration for XIVAPI PHP client

v2.1.0(5mo ago)0270MITPHPPHP ^8.3CI passing

Since Dec 8Pushed 5mo agoCompare

[ Source](https://github.com/izaghar/xivapi-laravel)[ Packagist](https://packagist.org/packages/izaghar/xivapi-laravel)[ Docs](https://github.com/izaghar/xivapi-laravel)[ RSS](/packages/izaghar-xivapi-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

XIVAPI Laravel
==============

[](#xivapi-laravel)

Laravel integration for the [XIVAPI PHP client](https://github.com/izaghar/xivapi-php).

Installation
------------

[](#installation)

```
composer require izaghar/xivapi-laravel
```

The service provider will be auto-discovered.

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=xivapi-config
```

### Environment Variables

[](#environment-variables)

```
XIVAPI_LANGUAGE=en
XIVAPI_GAME_VERSION=7.0
XIVAPI_SCHEMA=exdschema@latest
XIVAPI_LOCALIZATIONS=en,de,fr,ja
```

### Config File

[](#config-file)

```
// config/xivapi.php
return [
    'language' => env('XIVAPI_LANGUAGE'),
    'game_version' => env('XIVAPI_GAME_VERSION'),
    'schema' => env('XIVAPI_SCHEMA'),
    'localizations' => env('XIVAPI_LOCALIZATIONS'),
];
```

Usage
-----

[](#usage)

### Via Facade

[](#via-facade)

```
use XivApi\Laravel\Facades\XivApi;

// Fetch an item
$item = XivApi::sheet('Item')->row(4)->get();

// Search with query string
$results = XivApi::search()
    ->query('+Name~"Potion" +LevelItem>=10')
    ->sheets(['Item'])
    ->get();

// Search with SearchQuery builder
use XivApi\Query\SearchQuery;

$results = XivApi::search()
    ->query(SearchQuery::where('Name')->contains('Potion'))
    ->sheets(['Item'])
    ->get();

// Override global settings per-request
$item = XivApi::sheet('Item')
    ->row(4)
    ->language(Language::German)
    ->get();
```

### Via Dependency Injection

[](#via-dependency-injection)

```
use XivApi\XivApi;

class ItemController extends Controller
{
    public function show(XivApi $api, int $id)
    {
        return $api->sheet('Item')->row($id)->get();
    }
}
```

### Via Service Container

[](#via-service-container)

```
$api = app(XivApi::class);
$item = $api->sheet('Item')->row(4)->get();

// Or using the alias
$api = app('xivapi');
```

Laravel Data Integration
------------------------

[](#laravel-data-integration)

This package provides a normalizer for [spatie/laravel-data](https://spatie.be/docs/laravel-data) to convert XIVAPI responses directly into Data DTOs.

### Installation

[](#installation-1)

```
composer require spatie/laravel-data
```

### Usage

[](#usage-1)

Register the normalizer in your Data class:

```
use Spatie\LaravelData\Data;
use XivApi\Laravel\Normalizers\XivApiNormalizer;

class ItemData extends Data
{
    public function __construct(
        public int $rowId,
        public array $fields,
    ) {}

    public static function normalizers(): array
    {
        return [
            XivApiNormalizer::class,
        ];
    }
}
```

Then create Data objects directly from XIVAPI responses:

```
use XivApi\Laravel\Facades\XivApi;

$response = XivApi::sheet('Item')->row(4)->get();
$item = ItemData::from($response);
```

### Global Configuration

[](#global-configuration)

To use the normalizer globally for all Data classes, add it to your `config/data.php`:

```
// config/data.php
return [
    'normalizers' => [
        \XivApi\Laravel\Normalizers\XivApiNormalizer::class,
        \Spatie\LaravelData\Normalizers\ModelNormalizer::class,
        \Spatie\LaravelData\Normalizers\ArrayableNormalizer::class,
        \Spatie\LaravelData\Normalizers\ObjectNormalizer::class,
        \Spatie\LaravelData\Normalizers\ArrayNormalizer::class,
        \Spatie\LaravelData\Normalizers\JsonNormalizer::class,
    ],
];
```

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance73

Regular maintenance activity

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

154d ago

Major Versions

v1.0.0 → v2.0.02025-12-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ca99c235fec2611f26dd07b6889a6dc6bdbc4ef5c4d81c69aa3429dab16775d?d=identicon)[izaghar](/maintainers/izaghar)

---

Top Contributors

[![izaghar](https://avatars.githubusercontent.com/u/246080545?v=4)](https://github.com/izaghar "izaghar (3 commits)")

---

Tags

laravelapi clientffxivxivapifinal-fantasy

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/izaghar-xivapi-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/izaghar-xivapi-laravel/health.svg)](https://phpackages.com/packages/izaghar-xivapi-laravel)
```

###  Alternatives

[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[joggapp/laravel-aws-sns

Laravel package for the SNS events by AWS

3171.8k](/packages/joggapp-laravel-aws-sns)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[dragon-code/laravel-json-response

Automatically always return a response in JSON format

1118.6k1](/packages/dragon-code-laravel-json-response)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
