ldc-domaine-de-lanvaux/app/Http/Middleware/Authenticate.php

24 lines
566 B
PHP
Raw Permalink Normal View History

2022-08-05 09:38:44 +00: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.
*
* @param \Illuminate\Http\Request $request
* @return string|null
* @phpcs:disabled Squiz.Commenting.FunctionComment.TypeHintMissing
2022-08-05 09:38:44 +00:00
*/
protected function redirectTo($request)
2022-08-05 09:38:44 +00:00
{
// @phpcs:enable
2022-08-05 09:38:44 +00:00
if (!$request->expectsJson()) {
return route('bo.login');
}
}
}