diff --git a/src/Http/Controllers/MediaController.php b/src/Http/Controllers/MediaController.php index 0ebebad9..803131d1 100644 --- a/src/Http/Controllers/MediaController.php +++ b/src/Http/Controllers/MediaController.php @@ -5,6 +5,7 @@ use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\Gate; +use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; class MediaController extends Controller { @@ -27,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 \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException(), + default => throw new MethodNotAllowedHttpException(), }; } }