From 88300e544834937ad4cf72dcaaf91ba88cfe6138 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 13 Sep 2020 12:26:15 -0700 Subject: [PATCH] Support searching servers in admin area using name; closes #2100 --- app/Http/Controllers/Admin/Servers/ServerController.php | 2 +- app/Http/Controllers/Admin/UserController.php | 2 +- resources/views/admin/servers/index.blade.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Admin/Servers/ServerController.php b/app/Http/Controllers/Admin/Servers/ServerController.php index 90d2321f6..a0b73f552 100644 --- a/app/Http/Controllers/Admin/Servers/ServerController.php +++ b/app/Http/Controllers/Admin/Servers/ServerController.php @@ -45,7 +45,7 @@ class ServerController extends Controller public function index(Request $request) { $servers = QueryBuilder::for(Server::query()->with('node', 'user', 'allocation')) - ->allowedIncludes(['uuid', 'name', 'image']) + ->allowedFilters(['uuid', 'name', 'image']) ->allowedSorts(['id', 'uuid']) ->paginate(config()->get('pterodactyl.paginate.admin.servers')); diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index c712d7c02..f6d9a4c3b 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -85,7 +85,7 @@ class UserController extends Controller public function index(Request $request) { $users = QueryBuilder::for(User::query()->withCount('servers')) - ->allowedIncludes(['username', 'email', 'uuid']) + ->allowedFilters(['username', 'email', 'uuid']) ->allowedSorts(['id', 'uuid']) ->paginate(50); diff --git a/resources/views/admin/servers/index.blade.php b/resources/views/admin/servers/index.blade.php index ce8226319..f76ab1c33 100644 --- a/resources/views/admin/servers/index.blade.php +++ b/resources/views/admin/servers/index.blade.php @@ -26,7 +26,7 @@