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