diff --git a/src/Http/Controllers/MediaController.php b/src/Http/Controllers/MediaController.php index 803131d1..9b5cc933 100644 --- a/src/Http/Controllers/MediaController.php +++ b/src/Http/Controllers/MediaController.php @@ -28,7 +28,7 @@ public function __invoke(Request $request): JsonResponse 'GET' => new JsonResponse($field->paginate($request, $model)), 'POST' => new JsonResponse($field->upload($request, $model), JsonResponse::HTTP_CREATED), 'DELETE' => new JsonResponse(['deleted' => $field->prune($request, $model, $request->input('ids', []))]), - default => throw new MethodNotAllowedHttpException(), + default => throw new MethodNotAllowedHttpException(['GET', 'POST', 'DELETE']), }; } }