Skip to main content
All routes in MediPro are defined in routes/web.php as simple closures. There are no resource controllers, API routes, or route groups — only five GET routes.

Route table

MethodPathViewDescription
GET/welcomeHome screen with the module selector
GET/VentanaVentanaWindow configuration module
GET/PuertaPuertaDoor configuration module
GET/plano-imprimirplanos2dPrint view for windows — reads session('datos_lote')
GET/puertas-imprimirplanos2dPuertaPrint view for doors — reads session('puertas')

Route definitions

The complete routes/web.php file:
<?php

use Illuminate\Support\Facades\Route;

Route::get('/', function () {
    return view('welcome');
});

Route::get('Ventana', function () {
    return view('Ventana');
});

Route::get('Puerta', function () {
    return view('Puerta');
});

Route::get('/plano-imprimir', function () {
    $datos = session('datos_lote', []);
    return view('planos2d', compact('datos'));
})->name('plano.imprimir');

Route::get('/puertas-imprimir', function () {
    $datos = session('puertas', []);
    return view('planos2dPuerta', compact('datos'));
})->name('puertas.imprimir');

Named routes

Only the two print routes have names:
NamePath
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.
1

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'):
session()->put('datos_lote', $ventanasCompletas);
session()->save();
2

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.
3

Print route reads session and renders the view

The /plano-imprimir route closure reads session('datos_lote', []) and passes it as $datos to the planos2d Blade view. The view renders a printable layout for all windows and the browser’s print dialog opens automatically.
Route::get('/plano-imprimir', function () {
    $datos = session('datos_lote', []);
    return view('planos2d', compact('datos'));
})->name('plano.imprimir');
The door print flow is identical, except that the session key is puertas and the route is /puertas-imprimir:
Route::get('/puertas-imprimir', function () {
    $datos = session('puertas', []);
    return view('planos2dPuerta', compact('datos'));
})->name('puertas.imprimir');

No controller classes

The base App\Http\Controllers\Controller class exists in the project but is empty and unused:
namespace App\Http\Controllers;

abstract class Controller
{
    //
}
All route logic is handled directly in closures within routes/web.php. Livewire components own all application behavior beyond simple view rendering.

Build docs developers (and LLMs) love