File manager - Edit - /home/linknsbh/proffy.online/app/Http/Middleware/Authenticate.php
Back
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Auth\AuthenticationException; use Illuminate\Auth\Middleware\Authenticate as Middleware; use Illuminate\Http\Request; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Auth; use Symfony\Component\HttpFoundation\Response as ResponseAlias; class Authenticate extends Middleware { /** * Handle an incoming request. * * @param string[] ...$guards * * @throws AuthenticationException * @throws AuthenticationException */ public function handle($request, Closure $next, ...$guards) { $this->authenticate($request, $guards); App::setLocale(Auth::user()->language); return $next($request); } /** * Get the path the user should be redirected to when they are not authenticated. */ protected function redirectTo(Request $request) { if (! $request->expectsJson()) { return response()->json(['error' => 'Unauthenticated.'], ResponseAlias::HTTP_UNAUTHORIZED); } } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.58 |
proxy
|
phpinfo
|
Settings