diff --git a/src/Http/Middleware/AddTenantHeaderToResponse.php b/src/Http/Middleware/AddTenantHeaderToResponse.php index 057d56f..bbda4c2 100644 --- a/src/Http/Middleware/AddTenantHeaderToResponse.php +++ b/src/Http/Middleware/AddTenantHeaderToResponse.php @@ -5,11 +5,10 @@ use Closure; use Illuminate\Http\Request; -use Illuminate\Http\Response; use Sprout\Http\Resolvers\HeaderIdentityResolver; use Sprout\Sprout; use Sprout\Support\ResolutionHelper; -use Sprout\Support\ResolutionHook; +use Symfony\Component\HttpFoundation\Response; /** * Add Tenant Header to Response @@ -43,9 +42,10 @@ public function __construct(Sprout $sprout) * @param \Closure $next * @param string ...$options * - * @return \Illuminate\Http\Response + * @return \Symfony\Component\HttpFoundation\Response * - * @throws \Sprout\Exceptions\NoTenantFound + * @throws \Illuminate\Contracts\Container\BindingResolutionException + * @throws \Sprout\Exceptions\MisconfigurationException */ public function handle(Request $request, Closure $next, string ...$options): Response { @@ -68,7 +68,7 @@ public function handle(Request $request, Closure $next, string ...$options): Res } return $response->withHeaders([ - $resolver->getRequestHeaderName($tenancy) => $tenancy->identifier() + $resolver->getRequestHeaderName($tenancy) => $tenancy->identifier(), ]); } } diff --git a/src/Http/Middleware/TenantRoutes.php b/src/Http/Middleware/TenantRoutes.php index 941d501..1bc981f 100644 --- a/src/Http/Middleware/TenantRoutes.php +++ b/src/Http/Middleware/TenantRoutes.php @@ -48,7 +48,7 @@ public function __construct(Sprout $sprout) * @param \Closure $next * @param string ...$options * - * @return \Illuminate\Http\Response + * @return \Symfony\Component\HttpFoundation\Response * * @throws \Sprout\Exceptions\NoTenantFound * @throws \Illuminate\Contracts\Container\BindingResolutionException