Stelle das U0-Fundament mit CMS, Mitgliedern und Filament bereit.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
89b35ac480
commit
2035c46edd
130 files changed
+18519
-50
No files matched your search
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Middleware\UseStaffSessionCookie;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Configuration\Exceptions;
|
||||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
return Application::configure(basePath: dirname(__DIR__))
|
||||
->withRouting(
|
||||
web: __DIR__.'/../routes/web.php',
|
||||
commands: __DIR__.'/../routes/console.php',
|
||||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware): void {
|
||||
$middleware->trustProxies(at: '*');
|
||||
$middleware->prepend(UseStaffSessionCookie::class);
|
||||
$middleware->redirectGuestsTo(function (Request $request) {
|
||||
if ($request->is('verwaltung', 'verwaltung/*')) {
|
||||
return '/verwaltung/login';
|
||||
}
|
||||
|
||||
return '/anmelden';
|
||||
});
|
||||
$middleware->redirectUsersTo(function (Request $request) {
|
||||
if ($request->is('verwaltung', 'verwaltung/*')) {
|
||||
return '/verwaltung';
|
||||
}
|
||||
|
||||
return '/bereich';
|
||||
});
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions): void {
|
||||
$exceptions->shouldRenderJsonWhen(
|
||||
fn (Request $request) => $request->is('api/*') || $request->expectsJson(),
|
||||
);
|
||||
})->create();
|
||||
Reference in new issue
Block a user