REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 2.07 KB
Close
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Auth/Middleware/RedirectIfAuthenticated.php
Text
Base64
<?php namespace Illuminate\Auth\Middleware; use Closure; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Route; use Symfony\Component\HttpFoundation\Response; class RedirectIfAuthenticated { /** * The callback that should be used to generate the authentication redirect path. * * @var callable|null */ protected static $redirectToCallback; /** * Handle an incoming request. * * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next */ public function handle(Request $request, Closure $next, string ...$guards): Response { $guards = empty($guards) ? [null] : $guards; foreach ($guards as $guard) { if (Auth::guard($guard)->check()) { return redirect($this->redirectTo($request)); } } return $next($request); } /** * Get the path the user should be redirected to when they are authenticated. */ protected function redirectTo(Request $request): ?string { return static::$redirectToCallback ? call_user_func(static::$redirectToCallback, $request) : $this->defaultRedirectUri(); } /** * Get the default URI the user should be redirected to when they are authenticated. */ protected function defaultRedirectUri(): string { foreach (['dashboard', 'home'] as $uri) { if (Route::has($uri)) { return route($uri); } } $routes = Route::getRoutes()->get('GET'); foreach (['dashboard', 'home'] as $uri) { if (isset($routes[$uri])) { return '/'.$uri; } } return '/'; } /** * Specify the callback that should be used to generate the redirect path. * * @param callable $redirectToCallback * @return void */ public static function redirectUsing(callable $redirectToCallback) { static::$redirectToCallback = $redirectToCallback; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Authenticate.php
3.26 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AuthenticateWithBasicAuth.php
1.34 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Authorize.php
2.64 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EnsureEmailIsVerified.php
1.17 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RedirectIfAuthenticated.php
2.07 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RequirePassword.php
2.84 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).