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.

SaborGestion separates products (menu items sold to customers) from inventory (raw ingredients tracked by stock level). Both resources are accessible to users with the admin or cocinero role.
Route::resource('productos', ProductoController::class)->middleware('role:admin,cocinero');
Route::resource('inventario', InventarioController::class)->middleware('role:admin,cocinero');

Productos

Full CRUD for menu items with name, description, price, category, and active status.

Inventario

Ingredient tracking with quantity, unit of measure, and a minimum stock threshold that triggers a sidebar badge.

Products

Database schema

The productos table is defined in database/migrations/2026_03_21_004400_create_productos_table.php:
Schema::create('productos', function (Blueprint $table) {
    $table->id();
    $table->string('nombre');
    $table->text('descripcion')->nullable();
    $table->decimal('precio', 10, 2);
    $table->string('categoria');
    $table->boolean('activo')->default(true);
    $table->timestamps();
});
ColumnTypeNotes
idbigint (PK)Auto-increment
nombrevarcharProduct name, required
descripciontextOptional description
preciodecimal(10,2)Selling price
categoriavarcharCategory label (e.g., “Entradas”, “Bebidas”)
activobooleanWhether the product appears on the menu; defaults to true
created_at / updated_attimestampLaravel timestamps

Routes

The resource controller registers all standard RESTful routes under /productos:
MethodURIAction
GET/productosindex — list all products
GET/productos/createcreate — show creation form
POST/productosstore — save a new product
GET/productos/{producto}show — view a product
GET/productos/{producto}/editedit — show edit form
PUT/PATCH/productos/{producto}update — apply changes
DELETE/productos/{producto}destroy — delete a product

Adding a product

1

Open the products list

Navigate to /productos. You will see a table of all existing products.
2

Click Create

Go to /productos/create to open the creation form.
3

Fill in the fields

Enter the product nombre, optional descripción, precio, and categoría. The activo toggle defaults to enabled.
4

Submit

POST to /productos. The product is stored in the productos table and you are redirected to the product list.
Set activo to false to hide a product from selection in new orders without deleting its historical record.

Inventory

Database schema

The inventarios table is defined in database/migrations/2026_03_21_004623_create_inventarios_table.php:
Schema::create('inventarios', function (Blueprint $table) {
    $table->id();
    $table->string('ingrediente');
    $table->decimal('cantidad', 10, 2);
    $table->string('unidad');
    $table->decimal('stock_minimo', 10, 2)->default(5);
    $table->timestamps();
});
ColumnTypeNotes
idbigint (PK)Auto-increment
ingredientevarcharIngredient name
cantidaddecimal(10,2)Current quantity on hand
unidadvarcharUnit of measure (e.g., “kg”, “litros”, “unidades”)
stock_minimodecimal(10,2)Low-stock threshold; defaults to 5
created_at / updated_attimestampLaravel timestamps

Routes

MethodURIAction
GET/inventarioindex — list all ingredients
GET/inventario/createcreate — show creation form
POST/inventariostore — save a new ingredient
GET/inventario/{inventario}show — view an ingredient
GET/inventario/{inventario}/editedit — show edit form
PUT/PATCH/inventario/{inventario}update — apply changes
DELETE/inventario/{inventario}destroy — delete an ingredient

Low-stock badge

The sidebar displays a notification badge when one or more ingredients have a cantidad at or below their stock_minimo. This gives cooks and admins an at-a-glance warning without navigating into the inventory list.
The badge is a visual indicator only. SaborGestion does not send email or push notifications when stock is low.

Updating inventory stock

1

Navigate to the inventory list

Go to /inventario to see all ingredients with their current quantity and minimum threshold.
2

Identify low-stock items

Items where cantidadstock_minimo are highlighted and also shown in the sidebar badge count.
3

Open the edit form

Click Edit next to the ingredient or navigate to /inventario/{id}/edit.
4

Update the quantity

Enter the new cantidad value after restocking. You can also adjust the unidad or stock_minimo as needed.
5

Save

Submit the form. The inventarios record is updated and the sidebar badge recalculates on the next page load.

Build docs developers (and LLMs) love