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 a standard Laravel 12 application. The sections below cover the Artisan commands and Composer convenience scripts you will use most often.

Composer scripts

composer.json defines four scripts that wrap the most common multi-step workflows. Run them from the project root.

composer run setup

Performs a full first-time project setup: installs PHP and Node dependencies, generates the application key, runs migrations, and builds frontend assets.
composer run setup
This script executes the following steps in order:
composer install
php artisan key:generate
php artisan migrate --force
npm install
npm run build

composer run dev

Starts the full development environment with all four processes running concurrently in a single terminal.
composer run dev
Under the hood this runs:
npx concurrently \
  -c "#93c5fd,#c4b5fd,#fb7185,#fdba74" \
  "php artisan serve" \
  "php artisan queue:listen --tries=1 --timeout=0" \
  "php artisan pail --timeout=0" \
  "npm run dev" \
  --names=server,queue,logs,vite \
  --kill-others
ProcessCommandWhat it does
serverphp artisan serveLaravel development server at http://127.0.0.1:8000
queuephp artisan queue:listen --tries=1 --timeout=0Processes queued jobs as they arrive
logsphp artisan pail --timeout=0Streams application log output to the terminal
vitenpm run devVite HMR asset compiler
--kill-others means that if any one process exits, the remaining processes are stopped automatically.

composer run test

Clears the config cache and runs the full PHPUnit test suite.
composer run test
Equivalent to:
php artisan config:clear --ansi
php artisan test

Setup commands

Use these commands when bootstrapping the project manually or after pulling changes that include new migrations.
php artisan key:generate

Development commands

php artisan serve

Queue and logs

php artisan queue:listen --tries=1 --timeout=0

Testing

php artisan test

Creating users with Tinker

Because SaborGestion uses role-based access control, you need to assign a role value when creating users. Use Tinker to seed initial accounts without writing a seeder.
php artisan tinker
use App\Models\User;
use Illuminate\Support\Facades\Hash;

// Administrator
User::create([
    'name'     => 'Administrador',
    'email'    => 'admin@saborgestion.com',
    'password' => Hash::make('password'),
    'role'     => 'admin',
]);

// Waiter
User::create([
    'name'     => 'Mesero',
    'email'    => 'mesero@saborgestion.com',
    'password' => Hash::make('password'),
    'role'     => 'mesero',
]);

// Cook
User::create([
    'name'     => 'Cocinero',
    'email'    => 'cocinero@saborgestion.com',
    'password' => Hash::make('password'),
    'role'     => 'cocinero',
]);

// Cashier
User::create([
    'name'     => 'Cajero',
    'email'    => 'cajero@saborgestion.com',
    'password' => Hash::make('password'),
    'role'     => 'cajero',
]);
Valid values for the role field are: admin, mesero, cocinero, cajero. Any other value will fail the role middleware check on protected routes.
After creating users in Tinker you can verify them with User::all(['name','email','role']).

Build docs developers (and LLMs) love