charId = $jpa->charId; $this->corpId = $jpa->corpId; $this->page = $jpa->page; $this->esi = $jpa->esi; //Set the connection for the job $this->connection = 'redis'; } /** * Execute the job. * The job's task is to get all fo the information for all of the assets in * a structure and store them in the database. This task can take a few seconds * therefore we want the Horizon job queue to take care of the request rather * than the cronjob. * * @return void */ public function handle() { //Get the pages of the asset list $assets = $this->GePageOfAssets(); foreach($assets as $asset) { } } private function GetPageOfAssets() { try { $assets = $this->esi->page($this->page) ->invoke('get', '/corporations/{corporation_id}/assets/', [ 'corporation_id' => $this->corpId, ]); } catch (RequestFailedException $e) { Log::critical("Failed to get page of Assets from ESI."); $assets = null; } return $assets; } }