From e84f62d0f9bc1b6dc4013267ea13266db04a67b3 Mon Sep 17 00:00:00 2001 From: pratik kuikel <35728183+pratikkuikel@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:39:41 +0000 Subject: [PATCH] add deleteSiteLog method to delete the site's log --- README.md | 1 + src/Actions/ManagesSites.php | 12 ++++++++++++ src/Resources/Site.php | 10 ++++++++++ 3 files changed, 23 insertions(+) diff --git a/README.md b/README.md index 171e926..805f0f9 100644 --- a/README.md +++ b/README.md @@ -308,6 +308,7 @@ $site->installPhpMyAdmin($data); $site->removePhpMyAdmin(); $site->changePHPVersion($version); $site->siteLog(); +$site->deleteSiteLog(); ``` ### Site Workers diff --git a/src/Actions/ManagesSites.php b/src/Actions/ManagesSites.php index 03a580f..6c0db9c 100644 --- a/src/Actions/ManagesSites.php +++ b/src/Actions/ManagesSites.php @@ -485,4 +485,16 @@ public function siteLog($serverId, $siteId) { return $this->get("servers/$serverId/sites/$siteId/logs"); } + + /** + * Remove the given site's log when the log formatting is single. + * + * @param int $serverId + * @param int $siteId + * @return void + */ + public function deleteSiteLog($serverId, $siteId) + { + return $this->delete("servers/$serverId/sites/$siteId/logs"); + } } diff --git a/src/Resources/Site.php b/src/Resources/Site.php index cebbda9..a6cb6a2 100644 --- a/src/Resources/Site.php +++ b/src/Resources/Site.php @@ -475,4 +475,14 @@ public function siteLog() { return $this->forge->siteLog($this->serverId, $this->id); } + + /** + * Remove the log for this site. + * + * @return void + */ + public function deleteSiteLog() + { + return $this->forge->deleteSiteLog($this->serverId, $this->id); + } }