2024-07-23 06:19:59 +00:00
|
|
|
<?php
|
|
|
|
|
2024-07-24 08:13:16 +00:00
|
|
|
use App\Http\Middleware\JSONRequest;
|
2024-07-23 16:40:44 +00:00
|
|
|
use App\Http\Middleware\JWTMiddleware;
|
2024-07-23 06:19:59 +00:00
|
|
|
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',
|
2024-07-23 16:40:44 +00:00
|
|
|
api: __DIR__.'/../routes/api.php',
|
2024-07-23 06:19:59 +00:00
|
|
|
commands: __DIR__.'/../routes/console.php',
|
|
|
|
health: '/up',
|
|
|
|
)
|
|
|
|
->withMiddleware(function (Middleware $middleware) {
|
2024-07-23 16:40:44 +00:00
|
|
|
// $middleware->alias([
|
|
|
|
// 'jwt' => JWTMiddleware::class
|
|
|
|
// ]);
|
2024-07-24 08:13:16 +00:00
|
|
|
// add for api
|
|
|
|
$middleware->api([
|
2024-07-24 17:16:41 +00:00
|
|
|
JSONRequest::class,
|
2024-07-24 08:13:16 +00:00
|
|
|
]);
|
2024-07-23 06:19:59 +00:00
|
|
|
})
|
|
|
|
->withExceptions(function (Exceptions $exceptions) {
|
|
|
|
//
|
|
|
|
})->create();
|