Replace DatabaseHost Repository

This commit is contained in:
Lance Pioch 2022-10-23 02:14:54 -04:00
parent 860b2d890b
commit 9001755e10
10 changed files with 29 additions and 74 deletions

View file

@ -1,27 +0,0 @@
<?php
namespace Pterodactyl\Repositories\Eloquent;
use Illuminate\Support\Collection;
use Pterodactyl\Models\DatabaseHost;
use Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface;
class DatabaseHostRepository extends EloquentRepository implements DatabaseHostRepositoryInterface
{
/**
* Return the model backing this repository.
*/
public function model(): string
{
return DatabaseHost::class;
}
/**
* Return database hosts with a count of databases and the node
* information for which it is attached.
*/
public function getWithViewDetails(): Collection
{
return $this->getBuilder()->withCount('databases')->with('node')->get();
}
}