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); + } }