text4u
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Authenticate.php 409B

1234567891011121314151617
  1. <?php
  2. namespace App\Http\Middleware;
  3. use Illuminate\Auth\Middleware\Authenticate as Middleware;
  4. use Illuminate\Http\Request;
  5. class Authenticate extends Middleware
  6. {
  7. /**
  8. * Get the path the user should be redirected to when they are not authenticated.
  9. */
  10. protected function redirectTo(Request $request): ?string
  11. {
  12. return $request->expectsJson() ? null : route('login');
  13. }
  14. }