From f655188c58f2d0f985cde315c81a93b83c86f286 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 24 Feb 2018 11:48:24 -0600 Subject: [PATCH] Fix searching servers --- CHANGELOG.md | 1 + app/Http/Controllers/Admin/ServersController.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a02f1975a..dbb5c7c38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. ## v0.7.2 (Derelict Dermodactylus) ### Fixed * Fixes an exception thrown when trying to access the `/nests/:id/eggs/:id` API endpoint. +* Fixes search on server listing page. ### Added * Adds ability to include egg variables on an API request. diff --git a/app/Http/Controllers/Admin/ServersController.php b/app/Http/Controllers/Admin/ServersController.php index c64e76711..9e22bc1ed 100644 --- a/app/Http/Controllers/Admin/ServersController.php +++ b/app/Http/Controllers/Admin/ServersController.php @@ -201,12 +201,13 @@ class ServersController extends Controller /** * Display the index page with all servers currently on the system. * + * @param \Illuminate\Http\Request $request * @return \Illuminate\View\View */ - public function index() + public function index(Request $request) { return view('admin.servers.index', [ - 'servers' => $this->repository->getAllServers( + 'servers' => $this->repository->setSearchTerm($request->input('query'))->getAllServers( $this->config->get('pterodactyl.paginate.admin.servers') ), ]);