view = $view; $this->repository = $repository; } /** * Returns all of the servers that exist on the system using a paginated result set. If * a query is passed along in the request it is also passed to the repository function. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Contracts\View\View */ public function index(Request $request) { $servers = QueryBuilder::for(Server::query()->with('node', 'user', 'allocation')) ->allowedFilters(['uuid', 'name', 'image']) ->allowedSorts(['id', 'uuid']) ->paginate(config()->get('pterodactyl.paginate.admin.servers')); return $this->view->make('admin.servers.index', ['servers' => $servers]); } }