ldc-gen-game-web/app/Http/Middleware/Authenticate.php

22 lines
468 B
PHP
Raw Normal View History

2020-10-21 15:26:21 +02:00
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
2022-08-11 10:03:16 +02:00
* @param \Illuminate\Http\Request $request
2020-10-21 15:26:21 +02:00
* @return string|null
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}