get('https://cdn.coollabs.io/coolify/versions.json'); if ($response->successful()) { $versions = $response->json(); File::put(base_path('versions.json'), json_encode($versions, JSON_PRETTY_PRINT)); } else { send_internal_notification('PullTemplatesAndVersions failed with: ' . $response->status() . ' ' . $response->body()); } } } catch (\Throwable $e) { send_internal_notification('PullTemplatesAndVersions failed with: ' . $e->getMessage()); ray($e->getMessage()); } try { if (!isDev()) { ray('PullTemplatesAndVersions service-templates'); $response = Http::retry(3, 1000)->get(config('constants.services.official')); if ($response->successful()) { $services = $response->json(); File::put(base_path('templates/service-templates.json'), json_encode($services)); } else { send_internal_notification('PullTemplatesAndVersions failed with: ' . $response->status() . ' ' . $response->body()); } } } catch (\Throwable $e) { send_internal_notification('PullTemplatesAndVersions failed with: ' . $e->getMessage()); ray($e->getMessage()); } } }