Spaces:
Sleeping
Sleeping
Download app/Http/Middleware/Authenticate.php from Anuj-Panthri/Learn-Guide: direct link, hf CLI and curl.
- Browser
- Download file 409 Bytes
-
https://huggingface.co/spaces/Anuj-Panthri/Learn-Guide/resolve/main/app/Http/Middleware/Authenticate.php
- Command line
-
hf download hf://spaces/Anuj-Panthri/Learn-Guide/app/Http/Middleware/Authenticate.php
-
curl -L -o Authenticate.php https://huggingface.co/spaces/Anuj-Panthri/Learn-Guide/resolve/main/app/Http/Middleware/Authenticate.php
409 Bytes
| namespace App\Http\Middleware; | |
| use Illuminate\Auth\Middleware\Authenticate as Middleware; | |
| use Illuminate\Http\Request; | |
| class Authenticate extends Middleware | |
| { | |
| /** | |
| * Get the path the user should be redirected to when they are not authenticated. | |
| */ | |
| protected function redirectTo(Request $request): ?string | |
| { | |
| return $request->expectsJson() ? null : route('login'); | |
| } | |
| } | |