paginate databases when viewing a host

This commit is contained in:
Dane Everitt 2018-03-03 17:52:35 -06:00
parent e8cb441fc8
commit c739f292e4
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
7 changed files with 47 additions and 50 deletions

View file

@ -1,16 +1,10 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
namespace Pterodactyl\Contracts\Repository;
use Pterodactyl\Models\Database;
use Illuminate\Support\Collection;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
interface DatabaseRepositoryInterface extends RepositoryInterface
{
@ -39,6 +33,15 @@ interface DatabaseRepositoryInterface extends RepositoryInterface
*/
public function getDatabasesForServer(int $server): Collection;
/**
* Return all of the databases for a given host with the server relationship loaded.
*
* @param int $host
* @param int $count
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
*/
public function getDatabasesForHost(int $host, int $count = 25): LengthAwarePaginator;
/**
* Create a new database if it does not already exist on the host with
* the provided details.