9/4/25, 9:36 AM app.
php
bootstrap/app.php
1 <?php
2
3 use Illuminate\Foundation\Application;
4 use Illuminate\Foundation\Configuration\Exceptions;
5 use Illuminate\Foundation\Configuration\Middleware;
6
7 return Application::configure(basePath: dirname(__DIR__))
8 ->withRouting(
9 web: __DIR__.'/../routes/web.php',
10 commands: __DIR__.'/../routes/console.php',
11 health: '/up',
12 )
13 ->withMiddleware(function (Middleware $middleware): void {
14
15 $middleware->alias([
16 'role' => \App\Http\Middleware\CheckRole::class,
17 ]);
18 })
19 ->withExceptions(function (Exceptions $exceptions): void {
20 //
21 })->create();
22
localhost:45371/8317a694-42ab-4d74-9550-a548ca76c46c/ 1/1