Looking to hire Laravel developers? Try LaraJobs

gazelle-laravel-wrapper maintained by fuitad

Description
A Laravel wrapper for the Kitsu/Zou production tracker PHP client (fuitad/gazelle)
Last update
2026/02/26 21:00 (dev-main)
License
Links
Downloads
8

Comments
comments powered by Disqus

laravel-gazelle

A Laravel wrapper for fuitad/gazelle, the PHP client for the Kitsu / Zou production tracker API.

Requirements

  • PHP 8.1+
  • Laravel 10, 11, or 12

Installation

composer require fuitad/gazelle-laravel-wrapper

The service provider and facade are registered automatically via Laravel's package auto-discovery.

Configuration

Publish the config file:

php artisan vendor:publish --tag=gazelle-config

Then set your values in .env:

GAZELLE_HOST=https://kitsu.example.com/api
GAZELLE_SSL_VERIFY=true
GAZELLE_USE_REFRESH_TOKEN=true
Key Default Description
GAZELLE_HOST http://localhost/api Base URL of your Kitsu / Zou API
GAZELLE_SSL_VERIFY true Verify SSL certificates
GAZELLE_USE_REFRESH_TOKEN true Auto-refresh access token on expiry

Usage

Via the Facade

use GazelleLaravelWrapper\Facades\Gazelle;

// Authenticate
Gazelle::logIn('user@example.com', 'password');

// List all open projects
$projects = Gazelle::project->allOpenProjects();

// Get all shots for a project
$shots = Gazelle::shot->allShotsForProject($projects[0]);

// Log out
Gazelle::logOut();

Via dependency injection

use Gazelle\Gazelle;

class ProductionController extends Controller
{
    public function __construct(private readonly Gazelle $gazelle) {}

    public function index(): array
    {
        return $this->gazelle->project->allOpenProjects();
    }
}

Using an existing token

Gazelle::setToken('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...');

// Or with a refresh token
Gazelle::setToken([
    'access_token'  => 'eyJ...',
    'refresh_token' => 'eyJ...',
]);

MFA login

// TOTP
Gazelle::logIn('user@example.com', 'password', totp: '123456');

// Email OTP
Gazelle::sendEmailOtp('user@example.com');
Gazelle::logIn('user@example.com', 'password', emailOtp: '654321');

Available Modules

All modules are accessible as properties on the Gazelle instance (or facade):

Property Description
->asset Assets, asset types, asset instances
->shot Shots, sequences, episodes
->task Tasks, task types, task statuses, comments
->project Projects, project settings, team management
->person People, departments, avatars
->user Current-user-scoped queries
->files Output files, working files, preview files, softwares
->casting Shot / asset / episode casting
->edit Edits
->entity Generic entities and entity types
->studio Studios
->sync Event feed, project export / import
->playlist Playlists
->concept Concepts
->context Admin/user-context-aware convenience wrappers

See the fuitad/gazelle documentation for the full method reference of each module.

Testing

composer install
./vendor/bin/phpunit

License

MIT