ldc-wenn-dann-mit-respekt/app/Http/Middleware/Authenticate.php
Vincent BRIDIER 2aa73fa32c Clean + CI/CD
2022-12-23 17:24:09 +00:00

22 lines
539 B
PHP

<?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.
*
* @param \Illuminate\Http\Request $request
* @return string|null
* @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}