This commit is contained in:
TiclemFR
2023-12-29 15:42:55 +01:00
parent e42da70aca
commit 9d79d7c0c6
79 changed files with 11232 additions and 24 deletions

View File

@@ -0,0 +1,17 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
use Illuminate\Http\Request;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*/
protected function redirectTo(Request $request): ?string
{
return $request->expectsJson() ? null : route('login');
}
}