You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
469 B

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