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('room', function (string $value) { return \App\Models\Room::where('uuid', $value)->firstOrFail(); }); \Illuminate\Support\Facades\Route::bind('session', function (string $value) { return \App\Models\Session::where('uuid', $value)->firstOrFail(); }); \Illuminate\Support\Facades\Route::bind('recording', function (string $value) { return \App\Models\Recording::where('uuid', $value)->firstOrFail(); }); \Illuminate\Support\Facades\Route::bind('summary', function (string $value) { return \App\Models\AiSummary::where('uuid', $value)->firstOrFail(); }); \Illuminate\Support\Facades\Route::bind('template', function (string $value) { return \App\Models\Template::where('uuid', $value)->firstOrFail(); }); \Illuminate\Support\Facades\Route::bind('invitation', function (string $value) { return \App\Models\Invitation::where('uuid', $value)->firstOrFail(); }); \Illuminate\Support\Facades\Route::bind('webhook', function (string $value) { return \App\Models\WebhookEndpoint::where('uuid', $value)->firstOrFail(); }); \Illuminate\Support\Facades\Route::bind('poll', function (string $value) { return \App\Models\MeetPoll::where('uuid', $value)->firstOrFail(); }); \Illuminate\Support\Facades\Route::bind('breakout', function (string $value) { return \App\Models\BreakoutRoom::where('uuid', $value)->firstOrFail(); }); \Illuminate\Support\Facades\Route::bind('question', function (string $value) { return \App\Models\QaQuestion::where('uuid', $value)->firstOrFail(); }); \Illuminate\Support\Facades\Route::bind('file', function (string $value) { return \App\Models\SessionFile::where('uuid', $value)->firstOrFail(); }); \Illuminate\Support\Facades\Route::bind('registration', function (string $value) { return \App\Models\WebinarRegistration::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, 'meet.setup' => \App\Http\Middleware\EnsureOrganizationSetup::class, 'meet.ability' => \App\Http\Middleware\EnsureMeetAbility::class, ]); }) ->withExceptions(function (Exceptions $exceptions): void { // })->create();