Files
ladill-queue/bootstrap/app.php
T
isaaccladandCursor bc6bf0a07c
Deploy Ladill Queue / deploy (push) Successful in 28s
Faster voice announcements, Care/Frontdesk API, and console UI polish.
Poll displays every 1.2s with client-side TTS ack; expose service API for sibling apps; redesign tickets, counters, and staff console.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 21:51:13 +00:00

60 lines
2.7 KiB
PHP

<?php
use App\Http\Middleware\AuthenticateService;
use App\Http\Middleware\EnsurePlatformSession;
use App\Http\Middleware\SetActingAccount;
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',
api: __DIR__.'/../routes/api.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
then: function () {
\Illuminate\Support\Facades\Route::bind('ticket', function (string $value) {
return \App\Models\Ticket::where('uuid', $value)->firstOrFail();
});
\Illuminate\Support\Facades\Route::bind('serviceQueue', function (string $value) {
return \App\Models\ServiceQueue::where('uuid', $value)->firstOrFail();
});
\Illuminate\Support\Facades\Route::bind('counter', function (string $value) {
return \App\Models\Counter::where('uuid', $value)->firstOrFail();
});
\Illuminate\Support\Facades\Route::bind('device', function (string $value) {
return \App\Models\Device::where('uuid', $value)->firstOrFail();
});
\Illuminate\Support\Facades\Route::bind('appointment', function (string $value) {
return \App\Models\QueueAppointment::where('uuid', $value)->firstOrFail();
});
\Illuminate\Support\Facades\Route::bind('workflow', function (string $value) {
return \App\Models\Workflow::where('uuid', $value)->firstOrFail();
});
\Illuminate\Support\Facades\Route::bind('display', function (string $value) {
return \App\Models\DisplayScreen::where('uuid', $value)->firstOrFail();
});
},
)
->withMiddleware(function (Middleware $middleware): void {
$middleware->redirectGuestsTo(fn (Request $request) => route('sso.connect', [
'redirect' => $request->fullUrl(),
]));
$middleware->web(append: [
SetActingAccount::class,
]);
$middleware->alias([
'auth.service' => AuthenticateService::class,
'platform.session' => EnsurePlatformSession::class,
'qms.setup' => \App\Http\Middleware\EnsureOrganizationSetup::class,
'qms.ability' => \App\Http\Middleware\EnsureQmsAbility::class,
'qms.device' => \App\Http\Middleware\AuthenticateQmsDevice::class,
'qms.integration' => \App\Http\Middleware\EnsureQueueIntegration::class,
]);
})
->withExceptions(function (Exceptions $exceptions): void {
//
})->create();