Files
Caramel-CRM/bootstrap/app.php
T
vollstock c470240dc0 Fix: Job to check invoice due dates was never run
Made it a command so it runs with the scheduler
2026-03-05 10:42:40 +01:00

38 lines
1.1 KiB
PHP

<?php
use App\Http\Middleware\HandleAppearance;
use App\Http\Middleware\HandleInertiaRequests;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets;
$app = Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__ . '/../routes/web.php',
commands: __DIR__ . '/../routes/console.php',
health: '/up',
api: __DIR__ . '/../routes/api.php',
apiPrefix: 'api/',
)
->withMiddleware(function (Middleware $middleware) {
$middleware->encryptCookies(except: ['appearance', 'sidebar_state']);
$middleware->web(append: [
HandleAppearance::class,
HandleInertiaRequests::class,
AddLinkHeadersForPreloadedAssets::class,
]);
})
->withExceptions(function (Exceptions $exceptions) {
//
})->withKernels()->create();
$app->singleton(
\Illuminate\Contracts\Console\Kernel::class,
\App\Console\Kernel::class
);
return $app;