input('params'); $baseUrl = 'http://' .$printer->config->networkFormat(); //todo create service class to send requests $httpClient = Http::withHeaders([ // 'Accept-Language' => $integrationProfile->api_credentials['language'], // 'Authorization' => $authToken, ]); $url = $baseUrl . '/server/job_queue/job'; $query = []; $method = 'delete'; $response = $httpClient->{$method}($url, $method === 'get' ? $query : $data); dd($response); return ApiResponse::handle(); } }