Skip to main content

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.

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.

How Admin Access Works

Boletilandia uses a usertype 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:
// app/Http/Middleware/Admin.php
public function handle(Request $request, Closure $next): Response
{
    if (Auth::user()->usertype == 'admin') {
        return $next($request);
    }

    abort(401);
}
Similarly, regular users are protected by the User middleware, which checks for usertype == 'user' and also returns a 401 if the check fails — meaning admins cannot accidentally access user-only routes.
There is no UI or Artisan command to promote a user to admin. Promotion must be done via a direct database update: set the usertype column value to 'admin' on the target row in the users table. Be careful — removing or misspelling this value will immediately lock that user out of the admin panel.

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.
FeatureRouteDescription
Add Event formGET /homeCreate a new event with name, date, address, venue, and image
View Events listGET /admin-ver_eventosBrowse all upcoming events sorted by date
Edit Event formGET /admin-editar_eventos/{evento}Modify any field on an existing event
Delete EventDELETE /admin-eliminar_eventos/{evento}Permanently remove an event with a SweetAlert confirmation dialog
Sales Analytics chartGET /admin-grafica_eventosBar 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_eventos via a GET form submission
  • Ventas de Eventos — navigates to /admin-grafica_eventos via a GET form submission
The navbar also includes the Boletilandia logo, the application title “Boletilandia-Admin”, and the standard Jetstream profile / logout controls via <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.

Build docs developers (and LLMs) love