@@ 597-603 (lines=7) @@ | ||
594 | file_put_contents($ensureEmailIsVerifiedMiddlewareFile, $ensureEmailIsVerifiedMiddlewareFileeContent); |
|
595 | } |
|
596 | ||
597 | if (! Str::contains($redirectIfMiddlewareFileContent, 'MultiAuthGuards')) { |
|
598 | // replace old file |
|
599 | $deleted = unlink($redirectIfMiddlewareFile); |
|
600 | if ($deleted) { |
|
601 | file_put_contents($redirectIfMiddlewareFile, $redirectIfMiddlewareContentNew); |
|
602 | } |
|
603 | } |
|
604 | ||
605 | if (! Str::contains($authenticateMiddlewareFileContent, 'MultiAuthGuards')) { |
|
606 | // replace old file |
|
@@ 605-611 (lines=7) @@ | ||
602 | } |
|
603 | } |
|
604 | ||
605 | if (! Str::contains($authenticateMiddlewareFileContent, 'MultiAuthGuards')) { |
|
606 | // replace old file |
|
607 | $deleted = unlink($authenticateMiddlewareFile); |
|
608 | if ($deleted) { |
|
609 | file_put_contents($authenticateMiddlewareFile, $authenticateMiddlewareContentNew); |
|
610 | } |
|
611 | } |
|
612 | ||
613 | $redirectIfMiddlewareGroupContentNew = file_get_contents(__DIR__ . '/../Stubs/Middleware/redirectMiddleware.stub'); |
|
614 | $redirectIfMiddlewareGuardContentNew = file_get_contents(__DIR__ . '/../Stubs/Middleware/redirectMiddlewareGuard.stub'); |
|
@@ 651-657 (lines=7) @@ | ||
648 | $exceptionHandlerFileContentNew = file_get_contents(__DIR__ . '/../Stubs/Exceptions/handlerUnauthorized.stub'); |
|
649 | ||
650 | ||
651 | if (! Str::contains($exceptionHandlerFileContent, 'MultiAuthUnAuthenticated')) { |
|
652 | // replace old file |
|
653 | $deleted = unlink($exceptionHandlerFile); |
|
654 | if ($deleted) { |
|
655 | file_put_contents($exceptionHandlerFile, $exceptionHandlerFileContentNew); |
|
656 | } |
|
657 | } |
|
658 | ||
659 | $exceptionHandlerGuardContentNew = file_get_contents(__DIR__ . '/../Stubs/Exceptions/handlerGuard.stub'); |
|
660 | $exceptionHandlerGuardContentNew2 = str_replace('{{$nameSmall}}', "$nameSmall", |