This commit is contained in:
Jonas Pfalzgraf 2024-08-24 18:14:10 +02:00
parent 6c87fd881f
commit da38227067
97 changed files with 11536 additions and 0 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');
}
}