Replace simple paginator
This commit is contained in:
parent
679a25a763
commit
ed75f5cbfb
3 changed files with 1 additions and 17 deletions
|
@ -50,9 +50,4 @@ interface ServerRepositoryInterface extends RepositoryInterface
|
|||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getByUuid(string $uuid): Server;
|
||||
|
||||
/**
|
||||
* Returns all the servers that exist for a given node in a paginated response.
|
||||
*/
|
||||
public function loadAllServersForNode(int $node, int $limit): LengthAwarePaginator;
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ class NodeViewController extends Controller
|
|||
|
||||
return $this->view->make('admin.nodes.view.servers', [
|
||||
'node' => $node,
|
||||
'servers' => $this->serverRepository->loadAllServersForNode($node->id, 25),
|
||||
'servers' => $node->servers()->with(['user', 'nest', 'egg'])->paginate(25),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,15 +133,4 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
|
|||
throw new RecordNotFoundException();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the servers that exist for a given node in a paginated response.
|
||||
*/
|
||||
public function loadAllServersForNode(int $node, int $limit): LengthAwarePaginator
|
||||
{
|
||||
return $this->getBuilder()
|
||||
->with(['user', 'nest', 'egg'])
|
||||
->where('node_id', '=', $node)
|
||||
->paginate($limit);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue