Skip to content

Commit

Permalink
fix: Allow for all types of Symfony response
Browse files Browse the repository at this point in the history
  • Loading branch information
ollieread committed Nov 18, 2024
1 parent 2dad7d8 commit 60a6f89
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Http/Middleware/TenantRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 60a6f89

Please sign in to comment.