Skip to content
This repository was archived by the owner on Nov 13, 2025. It is now read-only.

2. Basic Usage

SimplyUnnamed edited this page Aug 13, 2021 · 1 revision

How to use

Using the endpoints is really simple. Create a Job, and extend the abstract job from the library corresponding to the ESI endpoint you want.

for example: Character info

<?php

namespace App\Jobs\Characters;

use LaravelEveTools\EveApi\Jobs\Characters\Character;

class CharacterInfo extends Character
{
    
    public $queue = 'public'; //Override this to set a specific que

    public function handle()
    {
        $results = $this->retrieve();

        logger()->info("Got character info", $results->getArrayCopy());
    }
}

Here we have a job, extending Character job from laravel eve tools. In the handle method, use the retrieve function to call the esi and get the information. This will return an EsiResponse object. For the purpose of this example, we just log the information.

to call this, you call it as you would any job.

CharacterInfo::dispatch($character_id);

Clone this wiki locally