esi = new Eseye(); } public function JumpsBetweenSystems($name1, $name2) { //Get the systems from the database $system1 = SolarSystem::where(['name' => $name1])->first(); $system2 = SolarSystem::where(['name' => $name2])->first(); try { $route = $this->esi->invoke('get', '/route/{origin}/{destination}/', [ 'origin' => $system1->solar_system_id, 'destination' => $system2->solar_system_id, ])->setQueryString([ 'flag' => 'secure', ])->invoke(); } catch(RequestFailedException $e) { return -1; } $length = sizeof($route); $length += 1; return $length; } } ?>