mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 06:13:45 +02:00
Added a test for the controller and cleaned up the controller
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user