The Boletilandia admin panel gives privileged users full control over the event lifecycle — from publishing new events to monitoring ticket revenue. Access to every admin route is gated behind a dedicated middleware layer, so understanding how admin identity is determined is essential before working with any of these features.Documentation 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.
How Admin Access Works
Boletilandia uses ausertype column on the users table to distinguish between roles. When a user authenticates, the AdminController@index method reads Auth()->user()->usertype and routes them to either the admin home (admin.index) or the standard user home (home.index).
All admin routes are protected by the Admin middleware (App\Http\Middleware\Admin). It checks the authenticated user’s usertype against the string 'admin' and aborts with a 401 response if the check fails:
User middleware, which checks for usertype == 'user' and also returns a 401 if the check fails — meaning admins cannot accidentally access user-only routes.
What the Admin Panel Includes
After logging in as an admin, the/home route renders the admin.index view, which presents the Add Event form. From there, the admin navigation bar provides access to all other admin features.
| Feature | Route | Description |
|---|---|---|
| Add Event form | GET /home | Create a new event with name, date, address, venue, and image |
| View Events list | GET /admin-ver_eventos | Browse all upcoming events sorted by date |
| Edit Event form | GET /admin-editar_eventos/{evento} | Modify any field on an existing event |
| Delete Event | DELETE /admin-eliminar_eventos/{evento} | Permanently remove an event with a SweetAlert confirmation dialog |
| Sales Analytics chart | GET /admin-grafica_eventos | Bar chart of total revenue per event powered by Highcharts |
Admin Navigation Menu
The admin navbar (resources/views/admin/nav_admin.blade.php) is included on every admin page and exposes three navigation links:
- Home — returns to
/home(the Add Event page) - Ver eventos — navigates to
/admin-ver_eventosvia aGETform submission - Ventas de Eventos — navigates to
/admin-grafica_eventosvia aGETform submission
<x-app-layout>.
Explore the Admin Guide
Managing Events
Learn how to create, edit, and delete events — including validation rules,
image uploads, and cascade deletion behaviour.
Sales Analytics
Understand how the revenue chart is built, what query powers it, and what
limitations apply to the current implementation.