1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 22:04:04 +00:00
This commit is contained in:
Abrar Ahmad 2022-11-25 11:00:22 +05:00
parent a6c0fa21c4
commit c0d0dc99de
10 changed files with 38 additions and 36 deletions

View file

@ -16,9 +16,9 @@ class UserImpersonation implements Feature
/** The lifespan of impersonation tokens (in seconds). */
public static int $ttl = 60;
public function bootstrap(Tenancy $tenancy): void
public function bootstrap(): void
{
$tenancy->macro('impersonate', function (Tenant $tenant, string $userId, string $redirectUrl, string $authGuard = null): ImpersonationToken {
Tenancy::macro('impersonate', function (Tenant $tenant, string $userId, string $redirectUrl, string $authGuard = null): ImpersonationToken {
return ImpersonationToken::create([
Tenancy::tenantKeyColumn() => $tenant->getTenantKey(),
'user_id' => $userId,