Merge pull request #1130 from stanjg/feature/stats-page

Added a statistics page to monitor the panel usage
This commit is contained in:
Dane Everitt 2018-05-31 22:56:58 -07:00 committed by GitHub
commit fd8d7c3571
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 576 additions and 0 deletions

View file

@ -328,4 +328,14 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
$this->app->make(SubuserRepository::class)->getBuilder()->select('server_id')->where('user_id', $user)
)->pluck('id')->all();
}
/**
* Get the amount of servers that are suspended
*
* @return int
*/
public function getSuspendedServersCount(): int
{
return $this->getBuilder()->where('suspended', true)->count();
}
}