Merge pull request #1130 from stanjg/feature/stats-page
Added a statistics page to monitor the panel usage
This commit is contained in:
commit
fd8d7c3571
14 changed files with 576 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue