Skip to content

Commit

Permalink
Merge pull request #65 from fodderstompf/add-horizon-statistics
Browse files Browse the repository at this point in the history
Adds laravel horizon statistics method
  • Loading branch information
Cannonb4ll authored Apr 26, 2022
2 parents fb70718 + fc94a1c commit 4031146
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ $ploi->servers(123)->sites(123)->testDomain();
$ploi->servers(123)->sites(123)->suspend($id = null, $reason = null);
// Resume site
$ploi->servers(123)->sites(123)->resume();

// Get Laravel Horizon statistics
$ploi->servers(123)->sites(123)->horizonStatistics($type);
```

### Databases
Expand Down
7 changes: 7 additions & 0 deletions src/Ploi/Resources/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ public function resume(int $id = null): Response
return $this->getPloi()->makeAPICall($this->getEndpoint() . '/resume', 'post');
}

public function horizonStatistics(string $type = 'stats'): Response
{
$this->buildEndpoint();

return $this->getPloi()->makeAPICall($this->getEndpoint() . '/laravel/horizon/' . $type);
}

public function redirects($id = null): Redirect
{
return new Redirect($this->getServer(), $this, $id);
Expand Down

0 comments on commit 4031146

Please sign in to comment.