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 is configured through the .env file in the project root. Copy .env.example to .env and adjust the values below for your environment.

Database

The application uses MySQL in production-like setups. The .env.example ships with SQLite defaults; switch to MySQL by uncommenting and updating these values:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=saborGestion
DB_USERNAME=root
DB_PASSWORD=
Create the database before running migrations:
CREATE DATABASE saborGestion CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Then run:
php artisan migrate

Application key

Laravel uses APP_KEY to encrypt session data and signed URLs. Generate it once after cloning:
php artisan key:generate
This writes a base64:-prefixed key to your .env. Never share or commit this value.
APP_KEY=base64:...
If APP_KEY is empty or invalid, all encrypted sessions and cookies will be broken. Every deployment needs its own unique key.

Other environment values

VariableDefaultNotes
APP_NAMELaravelChange to SaborGestion for display purposes
APP_ENVlocalSet to production on live servers
APP_DEBUGtrueSet to false in production
APP_URLhttp://localhostUpdate to your public domain
SESSION_DRIVERdatabaseSessions stored in the sessions table
QUEUE_CONNECTIONdatabaseJobs stored in the jobs table
BCRYPT_ROUNDS12Cost factor for password hashing

User roles

The role column on the users table is an enum with four values, added by the migration 2026_03_20_235344_add_role_to_users_table.php:
$table->enum('role', ['admin', 'mesero', 'cocinero', 'cajero'])->default('mesero');
Route-level enforcement is handled by RoleMiddleware, which checks Auth::user()->role against the roles declared on each route:
// app/Http/Middleware/RoleMiddleware.php
$userRole = Auth::user()->role;

if (in_array($userRole, $roles)) {
    return $next($request);
}

abort(403, 'No tienes permiso para acceder a esta página.');

Role access reference

RoleDashboardsProducts & InventoryTablesOrders, Comandas, DeliveryBilling & PaymentsUsers
adminAll fourYesYesYesYesYes
meseroMesero onlyNoYesNoNoNo
cocineroCocinero onlyYesNoNoNoNo
cajeroCajero onlyNoNoYesYesNo

Default development credentials

These accounts are created with the Tinker seed commands described in the installation guide:
RoleEmailPassword
adminadmin@saborgestion.com12345678
meseromesero@saborgestion.com12345678
cocinerococinero@saborgestion.com12345678
cajerocajero@saborgestion.com12345678
Change all default passwords before deploying to a production or publicly accessible environment. The default password 12345678 is intentionally weak and must not be used outside local development.
You can update a user’s password at any time with Tinker:
use App\Models\User;
use Illuminate\Support\Facades\Hash;

User::where('email', 'admin@saborgestion.com')
    ->update(['password' => Hash::make('your-new-password')]);

Build docs developers (and LLMs) love