From 60a6f89a21281553d3ea86622da8704442b0a9f0 Mon Sep 17 00:00:00 2001 From: Ollie Read Date: Mon, 18 Nov 2024 13:35:46 +0000 Subject: [PATCH] fix: Allow for all types of Symfony response --- src/Http/Middleware/TenantRoutes.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Http/Middleware/TenantRoutes.php b/src/Http/Middleware/TenantRoutes.php index 6b9d4f2..941d501 100644 --- a/src/Http/Middleware/TenantRoutes.php +++ b/src/Http/Middleware/TenantRoutes.php @@ -4,12 +4,11 @@ namespace Sprout\Http\Middleware; use Closure; -use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; -use Illuminate\Http\Response; use Sprout\Sprout; use Sprout\Support\ResolutionHelper; use Sprout\Support\ResolutionHook; +use Symfony\Component\HttpFoundation\Response; /** * Tenant Routes Middleware @@ -55,7 +54,7 @@ public function __construct(Sprout $sprout) * @throws \Illuminate\Contracts\Container\BindingResolutionException * @throws \Sprout\Exceptions\MisconfigurationException */ - public function handle(Request $request, Closure $next, string ...$options): Response|RedirectResponse + public function handle(Request $request, Closure $next, string ...$options): Response { if ($this->sprout->supportsHook(ResolutionHook::Middleware)) { [$resolverName, $tenancyName] = ResolutionHelper::parseOptions($options);