After completing a seat purchase, Boletilandia automatically prompts you to download a personalized PDF ticket. The file is generated on the fly by DomPDF from a Blade template and streams directly to your browser asDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AndresLopezCorrales/Boletilandia/llms.txt
Use this file to discover all available pages before exploring further.
boleto.pdf — no external service or email required.
The PDF is rendered fresh on every request by DomPDF. Your Laravel session must still be active at the time you click OK in the confirmation dialog, because the ticket template reads
letra_seccion and numero_asiento directly from the session. If the session has expired, those values will be missing from the downloaded file.Triggering the Download
When a purchase succeeds, the server redirects to/home with a message = 'boleto comprado' flash value and stores three session keys (evento_id, letra_seccion, numero_asiento). The home Blade template detects both values and injects the following SweetAlert2 script:
GET form to /pdf-boleto/{evento_id}.
The PDF Generation Route
user middleware and is handled by PdfController::generarPdf():
{evento} to the matching Evento record automatically. DomPDF loads the home.pdf-boleto Blade view, renders it to PDF, and streams the result as a file download named boleto.pdf.
Session Keys Used
| Session key | Contents |
|---|---|
evento_id | The integer ID of the purchased event |
letra_seccion | The section letter (e.g., A, B, H) |
numero_asiento | The seat number within that section |
BoletoController::comprarAsiento() immediately after a successful seat save and are consumed by the PDF Blade template via Session::get().
What the PDF Contains
The rendered ticket includes the following information pulled from theEvento model and the active session:
NombreEvento
The event name, shown as a large
<h1> heading at the top of the ticket.Auth user name
A personalised welcome line: Bienvenido, , using
Auth::user()->name.LugarEvento
The venue name, listed under Lugar: in the event details section.
DireccionEvento
The venue street address, listed under Dirección:.
FechaEvento
The event date, listed under Fecha:.
Seat assignment
The section letter and seat number from the session, displayed as
{letra_seccion} - {numero_asiento} in a centred <h2>.The PDF Blade Template
The full source ofresources/views/home/pdf-boleto.blade.php is reproduced below. DomPDF renders this HTML to produce the downloadable file:
The Admission Warning
The final line of the ticket, styled in red via#nota { color: red }, reads:
NOTA: SI NO SE PRESENTA CON ESTA HOJA, SE LE NEGARÁ LA ENTRADAThis note instructs attendees that they must present the printed or on-screen PDF to gain entry. There is no QR code or barcode validation in the current implementation — venue staff verify the ticket visually.