Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Henry4ndrew/saborGestion/llms.txt

Use this file to discover all available pages before exploring further.

These three features cover the operational flow from seating a customer to handing food to a delivery driver. Each has its own resource controller and role restriction.

Mesas

Table management for the dining room. Available to admin and mesero.

Pedidos

Order taking linked to a table or walk-in customer. Available to admin and cajero.

Comandas

Per-item kitchen tickets tied to an order. Available to admin and cajero.

Delivery

Delivery tracking with address, phone, and driver assignment. Available to admin and cajero.

Tables (mesas)

Route::resource('mesas', MesaController::class)->middleware('role:admin,mesero');

Database schema

Defined in database/migrations/2026_03_21_004811_create_mesas_table.php:
Schema::create('mesas', function (Blueprint $table) {
    $table->id();
    $table->string('numero');
    $table->integer('capacidad');
    $table->enum('estado', ['disponible', 'ocupada', 'reservada'])->default('disponible');
    $table->timestamps();
});
ColumnTypeNotes
idbigint (PK)Auto-increment
numerovarcharTable identifier (e.g., “Mesa 1”, “Terraza 3”)
capacidadintegerMaximum number of guests
estadoenumdisponible, ocupada, or reservada; defaults to disponible
created_at / updated_attimestampLaravel timestamps

Routes

MethodURIAction
GET/mesasindex
GET/mesas/createcreate
POST/mesasstore
GET/mesas/{mesa}show
GET/mesas/{mesa}/editedit
PUT/PATCH/mesas/{mesa}update
DELETE/mesas/{mesa}destroy

Table states

StateMeaning
disponibleTable is free and ready to seat guests
ocupadaTable is currently in use and has an active order
reservadaTable is reserved and should not be seated walk-ins

Orders (pedidos)

Route::resource('pedidos', PedidoController::class)->middleware('role:admin,cajero');

Database schema

Defined in database/migrations/2026_03_21_012542_create_pedidos_table.php:
Schema::create('pedidos', function (Blueprint $table) {
    $table->id();
    $table->foreignId('mesa_id')->nullable()->constrained()->onDelete('set null');
    $table->string('cliente')->nullable();
    $table->decimal('total', 10, 2)->default(0);
    $table->enum('estado', ['pendiente', 'preparando', 'listo', 'entregado', 'cancelado'])->default('pendiente');
    $table->timestamp('fecha')->useCurrent();
    $table->timestamps();
});
ColumnTypeNotes
idbigint (PK)Auto-increment
mesa_idbigint (FK, nullable)References mesas.id; SET NULL on mesa deletion
clientevarchar (nullable)Customer name for walk-in or delivery orders
totaldecimal(10,2)Running order total; defaults to 0
estadoenumOrder status (see below); defaults to pendiente
fechatimestampOrder creation time; defaults to CURRENT_TIMESTAMP
created_at / updated_attimestampLaravel timestamps

Order statuses

StatusDescription
pendienteOrder has been placed, not yet sent to the kitchen
preparandoKitchen has started preparing the order
listoAll items are ready for service or pickup
entregadoOrder has been delivered to the customer
canceladoOrder was cancelled before completion

Routes

MethodURIAction
GET/pedidosindex
GET/pedidos/createcreate
POST/pedidosstore
GET/pedidos/{pedido}show
GET/pedidos/{pedido}/editedit
PUT/PATCH/pedidos/{pedido}update
DELETE/pedidos/{pedido}destroy

Kitchen tickets (comandas)

Comandas are the per-item kitchen instructions attached to an order. Each comanda record links one product to one order with a quantity and its own preparation state.
Route::resource('comandas', ComandaController::class)->middleware('role:admin,cajero');

Database schema

Defined in database/migrations/2026_03_21_012543_create_comandas_table.php:
Schema::create('comandas', function (Blueprint $table) {
    $table->id();
    $table->foreignId('pedido_id')->constrained()->onDelete('cascade');
    $table->foreignId('producto_id')->constrained()->onDelete('cascade');
    $table->integer('cantidad');
    $table->enum('estado', ['pendiente', 'preparando', 'listo'])->default('pendiente');
    $table->timestamps();
});
ColumnTypeNotes
idbigint (PK)Auto-increment
pedido_idbigint (FK)References pedidos.id; cascades on delete
producto_idbigint (FK)References productos.id; cascades on delete
cantidadintegerNumber of units to prepare
estadoenumTicket status; defaults to pendiente
created_at / updated_attimestampLaravel timestamps

Comanda statuses

StatusDescription
pendienteTicket received, not yet started
preparandoCook is actively preparing this item
listoItem is plated and ready for service
Deleting a pedido cascades to all its comandas. Deleting a producto also cascades to any outstanding comandas referencing it.

Routes

MethodURIAction
GET/comandasindex
GET/comandas/createcreate
POST/comandasstore
GET/comandas/{comanda}show
GET/comandas/{comanda}/editedit
PUT/PATCH/comandas/{comanda}update
DELETE/comandas/{comanda}destroy

Delivery orders

Delivery records extend an existing pedido with the logistics details needed for off-premise delivery.
Route::resource('delivery', DeliveryController::class)->middleware('role:admin,cajero');

Database schema

Defined in database/migrations/2026_03_21_012544_create_deliveries_table.php:
Schema::create('deliveries', function (Blueprint $table) {
    $table->id();
    $table->foreignId('pedido_id')->constrained()->onDelete('cascade');
    $table->string('direccion');
    $table->string('telefono');
    $table->string('repartidor')->nullable();
    $table->enum('estado', ['pendiente', 'en_camino', 'entregado'])->default('pendiente');
    $table->timestamps();
});
ColumnTypeNotes
idbigint (PK)Auto-increment
pedido_idbigint (FK)References pedidos.id; cascades on delete
direccionvarcharDelivery address
telefonovarcharCustomer phone number
repartidorvarchar (nullable)Driver name; can be assigned after creation
estadoenumDelivery status; defaults to pendiente
created_at / updated_attimestampLaravel timestamps

Delivery statuses

StatusDescription
pendienteOrder placed, not yet dispatched
en_caminoDriver has picked up the order and is en route
entregadoOrder successfully delivered to the customer

Routes

MethodURIAction
GET/deliveryindex
GET/delivery/createcreate
POST/deliverystore
GET/delivery/{delivery}show
GET/delivery/{delivery}/editedit
PUT/PATCH/delivery/{delivery}update
DELETE/delivery/{delivery}destroy

Full order workflow

1

Seat the customer (mesero)

Update the mesa estado to ocupada at /mesas/{mesa}/edit.
2

Create the order (cajero)

Open /pedidos/create. Select the mesa and optionally enter the customer name. Submit to create the pedido with estado = pendiente.
3

Add kitchen tickets (cajero)

For each item, create a comanda at /comandas/create linking pedido_id and producto_id with the desired cantidad.
4

Kitchen prepares items (cocinero)

The cook updates each comanda from pendientepreparandolisto as items are prepared.
5

Mark order delivered

Once all comandas are listo, the cajero updates the pedido estado to entregado.
6

Free the table

Update the mesa estado back to disponible so the next party can be seated.
For delivery orders, create the pedido without a mesa_id, then immediately create a delivery record with the customer’s address and phone number.

Build docs developers (and LLMs) love