mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 22:14:03 +00:00
Merge branch 'master' of github.com:archtechx/tenancy
This commit is contained in:
commit
2de182a260
6 changed files with 11 additions and 6 deletions
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Stancl\Tenancy\Database\Concerns;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -10,5 +10,6 @@ abstract class TenancyEvent
|
|||
{
|
||||
public function __construct(
|
||||
public Tenancy $tenancy,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ class InitializeTenancyByDomain extends IdentificationMiddleware
|
|||
public function __construct(
|
||||
protected Tenancy $tenancy,
|
||||
protected DomainTenantResolver $resolver,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/** @return \Illuminate\Http\Response|mixed */
|
||||
public function handle(Request $request, Closure $next): mixed
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ class InitializeTenancyByPath extends IdentificationMiddleware
|
|||
public function __construct(
|
||||
protected Tenancy $tenancy,
|
||||
protected PathTenantResolver $resolver,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/** @return \Illuminate\Http\Response|mixed */
|
||||
public function handle(Request $request, Closure $next): mixed
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ class InitializeTenancyByRequestData extends IdentificationMiddleware
|
|||
public function __construct(
|
||||
protected Tenancy $tenancy,
|
||||
protected RequestDataTenantResolver $resolver,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/** @return \Illuminate\Http\Response|mixed */
|
||||
public function handle(Request $request, Closure $next): mixed
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Stancl\Tenancy\CacheManager;
|
||||
use Stancl\Tenancy\Contracts\Tenant;
|
||||
use Stancl\Tenancy\Tenancy;
|
||||
|
||||
|
|
@ -73,7 +72,7 @@ if (! function_exists('global_cache')) {
|
|||
return app('globalCache')->get(...$arguments);
|
||||
}
|
||||
|
||||
if (!is_array($arguments[0])) {
|
||||
if (! is_array($arguments[0])) {
|
||||
throw new InvalidArgumentException(
|
||||
'When setting a value in the cache, you must pass an array of key / value pairs.'
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue