mirror of
https://github.com/twinpath/app.git
synced 2026-01-26 05:15:28 +07:00
Initial commit
This commit is contained in:
26
bootstrap/app.php
Normal file
26
bootstrap/app.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Configuration\Exceptions;
|
||||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
|
||||
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->redirectTo(
|
||||
guests: '/signin',
|
||||
users: '/dashboard'
|
||||
);
|
||||
|
||||
$middleware->alias([
|
||||
'admin' => \App\Http\Middleware\EnsureUserIsAdmin::class,
|
||||
'api_key' => \App\Http\Middleware\CheckApiKey::class,
|
||||
]);
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions): void {
|
||||
//
|
||||
})->create();
|
||||
Reference in New Issue
Block a user