routes/web.php as simple closures. There are no resource controllers, API routes, or route groups — only five GET routes.
Route table
| Method | Path | View | Description |
|---|---|---|---|
GET | / | welcome | Home screen with the module selector |
GET | /Ventana | Ventana | Window configuration module |
GET | /Puerta | Puerta | Door configuration module |
GET | /plano-imprimir | planos2d | Print view for windows — reads session('datos_lote') |
GET | /puertas-imprimir | planos2dPuerta | Print view for doors — reads session('puertas') |
Route definitions
The completeroutes/web.php file:
Named routes
Only the two print routes have names:| Name | Path |
|---|---|
plano.imprimir | /plano-imprimir |
puertas.imprimir | /puertas-imprimir |
These names are referenced in Blade templates using the
route() helper. For example, in ventanas.sistema-nova the hidden iframe uses data-url="{{ route('plano.imprimir') }}" to avoid hardcoding the path.Session-based print flow
The print routes do not accept query parameters or request bodies. Instead, they read data that was previously saved to the PHP session by a Livewire action.User clicks IMPRIMIR in the window configurator
imprimirTodo() in ventanas.sistema-nova calculates the complete data for every window in the current session, then saves the result to session('datos_lote'):Browser event triggers the iframe
After saving to session, the component dispatches the
disparar-impresion-total event. A JavaScript listener in the component template sets the iframe’s src to route('plano.imprimir'), which triggers a GET request to /plano-imprimir.puertas and the route is /puertas-imprimir:
No controller classes
The baseApp\Http\Controllers\Controller class exists in the project but is empty and unused:
routes/web.php. Livewire components own all application behavior beyond simple view rendering.