1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-15 15:34:02 +00:00

phpstan, global_cache, resolver improvements, InitializationHelpers trait

This commit is contained in:
Samuel Štancl 2022-09-29 02:47:13 +02:00
parent fd65cf1754
commit 87212e5390
35 changed files with 170 additions and 231 deletions

View file

@ -5,16 +5,13 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
class InitializeTenancyByDomainOrSubdomain
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
*/
public function handle($request, Closure $next)
/** @return \Illuminate\Http\Response|mixed */
public function handle(Request $request, Closure $next): mixed
{
if ($this->isSubdomain($request->getHost())) {
return app(InitializeTenancyBySubdomain::class)->handle($request, $next);