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

22 lines
468 B
PHP
Raw Permalink 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-03-11 09:50:03 +01: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');
}
}
}