ldc-nature-and-respect/app/Http/Middleware/Authenticate.php

23 lines
539 B
PHP
Raw Normal View History

2022-11-18 12:39:03 +01: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-11-18 15:35:39 +01:00
* @param \Illuminate\Http\Request $request
2022-11-18 12:39:03 +01:00
* @return string|null
2022-12-23 17:24:09 +00:00
* @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing
2022-11-18 12:39:03 +01:00
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}