Skip to main content

Overview

The Waiter (Mesero) role is designed for front-of-house staff who manage table assignments, handle reservations, and coordinate customer seating. Waiters have a dedicated dashboard and access to table management features.
Waiter access is controlled through the RoleMiddleware using the mesero role identifier, ensuring only authorized staff can manage tables and reservations.

Role-Based Access Control

Waiter routes are protected by middleware that validates mesero credentials:
// routes/mesero.php - Line 7
Route::middleware(['auth', 'role:mesero'])->prefix('mesero')->group(function () {
    Route::get('/home', fn() => view('mesero.meserohome'))->name('mesero.home');
    Route::get('/tables', [MeseroController::class, 'viewTables']);
    Route::get('/reservations', [MeseroController::class, 'meseroviewreservation']);
});

Shared Admin Panel Access

Waiters also have access to specific sections of the unified admin panel:
// routes/web.php - Lines 86-99
// Tables - shared with admin
Route::middleware('role:admin,mesero')->group(function () {
    Route::resource('tables', AdminTableController::class)->names('tables');
    Route::post('tables/{table}/mark-as-used', [AdminTableController::class, 'markAsUsed']);
});

// Reservations - shared with admin
Route::middleware('role:admin,mesero')->group(function () {
    Route::get('reservations', [AdminReservationController::class, 'index']);
    Route::post('reservations/{reservation}/assign-table', 
                [AdminReservationController::class, 'assignTable']);
});

Waiter Dashboard

Waiters have access to their dedicated home page:
// routes/mesero.php - Line 9
Route::get('/home', fn() => view('mesero.meserohome'))->name('mesero.home');
Dashboard Route:
GET /mesero/home

Table Management

View Tables

Browse all restaurant tables with current status and capacity.

Create Tables

Add new tables with seating capacity and type.

Update Tables

Modify table details and change status.

Mark as Used

Update table status when customers are seated.

Table Routes

// routes/mesero.php - Lines 12-15
Route::get('/tables', [MeseroController::class, 'viewTables'])->name('mesero.tables');
Route::post('/tables', [MeseroController::class, 'storeTable'])->name('mesero.tables.store');
Route::put('/tables/{id}', [MeseroController::class, 'updateTable'])->name('mesero.tables.update');
Route::delete('/tables/{id}', [MeseroController::class, 'deleteTable'])->name('mesero.tables.delete');

Viewing Tables

// app/Http/Controllers/MeseroController.php - Lines 11-15
public function viewTables()
{
    $tables = Table::all();
    return view('mesero.meseromesas', compact('tables'));
}

Creating Tables

1

Navigate to Tables Section

Access the table management page at /mesero/tables.
2

Fill Table Details

Provide table name, number, type, seating capacity, and initial status.
3

Validate Information

System checks for duplicate table numbers and validates all fields.
4

Save Table

The new table is created and immediately available for assignment.
// app/Http/Controllers/MeseroController.php - Lines 17-30
public function storeTable(Request $request)
{
    $request->validate([
        'name' => 'required|string|max:255',
        'number' => 'required|integer|unique:tables,number',
        'type' => 'required|string',
        'seats' => 'required|integer',
        'status' => 'required|string',
    ]);

    Table::create($request->all());

    return redirect()->route('meseromesas')
        ->with('success', 'Mesa agregada correctamente.');
}

Updating Tables

// app/Http/Controllers/MeseroController.php - Lines 32-53
public function updateTable(Request $request, $id)
{
    $request->validate([
        'name' => 'required|string|max:255',
        'number' => 'required|integer|unique:tables,number,' . $id,
        'type' => 'required|string',
        'seats' => 'required|integer',
        'status' => 'required|string|in:available,occupied,reservada',
    ]);

    $table = Table::findOrFail($id);

    $table->name = $request->input('name');
    $table->number = $request->input('number');
    $table->type = $request->input('type');
    $table->seats = $request->input('seats');
    $table->status = $request->input('status');
    $table->save();

    return redirect()->route('meseromesas')
        ->with('success', 'Mesa actualizada correctamente.');
}

Table Statuses

Tables can have three different statuses:
  • available - Table is clean and ready for customers
  • occupied - Table is currently in use
  • reservada - Table is reserved for upcoming reservation

Marking Tables as Used

// routes/mesero.php - Line 22
Route::post('/tables/{id}/mark-as-used', [TableController::class, 'markAsUsed'])
    ->name('mesero.tables.used');

Reservation Management

Waiters can view all reservations and assign available tables to guests.

Reservation Routes

// routes/mesero.php - Lines 18-19
Route::get('/reservations', [MeseroController::class, 'meseroviewreservation'])
    ->name('mesero.reservations');
Route::post('/reservations/{reservationId}/assign-table', 
             [MeseroController::class, 'assignTable'])
    ->name('mesero.reservations.assign');

Viewing Reservations

// app/Http/Controllers/MeseroController.php - Lines 62-70
public function meseroviewreservation()
{
    // Get all reservations with assigned tables
    $reservations = Reservation::with('table')->get();
    // Get available tables for assignment
    $tables = Table::where('status', 'disponible')->get();

    return view('mesero.meseroreservation', compact('reservations', 'tables'));
}

Assigning Tables to Reservations

1

Check Reservation Details

Review guest name, party size, date, and time of the reservation.
2

Find Matching Table

Select a table where the seating capacity matches the guest count.
3

Assign Table

Submit the table assignment - the system validates capacity match.
4

Confirm Assignment

Table status changes to ‘reservada’ and is linked to the reservation.
// app/Http/Controllers/MeseroController.php - Lines 73-99
public function assignTable(Request $request, $reservationId)
{
    $reservation = Reservation::findOrFail($reservationId);
    $table = Table::findOrFail($request->table_id);

    // Verify guest count matches table capacity
    if ($reservation->guest == $table->seats) {
        // Assign table to reservation
        $reservation->table_id = $table->id;
        $reservation->save();

        // Mark table as reserved
        $table->status = 'reservada';
        $table->save();

        return response()->json([
            'success' => true,
            'table_name' => $table->name,
            'user_name' => $reservation->name,
        ]);
    } else {
        return response()->json([
            'success' => false,
            'message' => 'El número de invitados no coincide con los asientos de la mesa.',
        ]);
    }
}
The system automatically validates that the number of guests in the reservation matches the seating capacity of the selected table before completing the assignment.

Deleting Tables

// app/Http/Controllers/MeseroController.php - Lines 55-61
public function deleteTable($id)
{
    $table = Table::findOrFail($id);
    $table->delete();

    return redirect()->route('meseromesas')
        ->with('success', 'Mesa eliminada correctamente.');
}

Available Permissions

Table Management

Full CRUD operations on restaurant tables

Reservation Assignment

Assign available tables to reservations

Status Updates

Change table status (available, occupied, reserved)

Capacity Validation

Automatic validation of guest count vs. table capacity

Waiter Workflows

Daily Opening Workflow

1

Review Table Status

Check all tables at /mesero/tables and ensure statuses are accurate.
2

Reset Tables

Update any ‘occupied’ tables from the previous day to ‘available’.
3

Check Reservations

Review today’s reservations at /mesero/reservations.
4

Pre-assign Tables

Assign tables to confirmed reservations before service begins.
5

Prepare Floor Plan

Verify table arrangements match the system configuration.

Guest Seating Workflow

1

Greet Guests

Determine party size and check for reservations.
2

Check Table Availability

Find a table with appropriate capacity and ‘available’ status.
3

Assign Table

If reservation exists, assign table through system. Otherwise, mark table as used.
4

Update Status

Change table status to ‘occupied’ once guests are seated.
5

Service Coordination

Coordinate with kitchen and other staff for order taking.

Reservation Handling Workflow

1

Monitor Reservations

Keep the reservations page open to track upcoming arrivals.
2

15-Minute Warning

Check for reservations arriving within the next 15 minutes.
3

Prepare Table

If not already assigned, select and assign appropriate table.
4

Guest Arrival

Greet guests by name and escort to their reserved table.
5

Update Status

Mark table as ‘occupied’ once guests are seated.

Table Turnover Workflow

1

Clear Table

Coordinate with bus staff to clear and clean the table.
2

Inspect Table

Verify table is clean and properly set.
3

Update Status

Change table status from ‘occupied’ to ‘available’.
4

Check Waitlist

Immediately check for waiting guests or upcoming reservations.
5

Assign Next Guest

Seat next party or mark as available for walk-ins.

Table Structure

Each table includes the following information:
FieldTypeRequiredDescription
namestringYesDisplay name of the table
numberintegerYesUnique table number
typestringYesTable type (booth, regular, outdoor, etc.)
seatsintegerYesSeating capacity
statusstringYesCurrent status (available, occupied, reservada)

API Examples

Create a Table

POST /mesero/tables
Content-Type: application/json

{
  "name": "Table 15",
  "number": 15,
  "type": "booth",
  "seats": 4,
  "status": "available"
}

Update Table Status

PUT /mesero/tables/5
Content-Type: application/json

{
  "name": "Table 5",
  "number": 5,
  "type": "regular",
  "seats": 6,
  "status": "occupied"
}

Assign Table to Reservation

POST /mesero/reservations/12/assign-table
Content-Type: application/json

{
  "table_id": 8
}

Response (Success):
{
  "success": true,
  "table_name": "Table 8",
  "user_name": "John Smith"
}

Response (Failure):
{
  "success": false,
  "message": "El número de invitados no coincide con los asientos de la mesa."
}

Mark Table as Used

POST /mesero/tables/5/mark-as-used

Security Features

All waiter routes are protected by the auth and role:mesero middleware, ensuring only authenticated waiters can manage tables and reservations.

Unique Table Numbers

The system enforces unique table numbers to prevent conflicts:
'number' => 'required|integer|unique:tables,number'
When updating, the validation excludes the current table:
'number' => 'required|integer|unique:tables,number,' . $id

Capacity Validation

Automatic validation ensures guests are assigned to appropriately sized tables:
if ($reservation->guest == $table->seats) {
    // Allow assignment
} else {
    // Reject assignment
}

Best Practices

  1. Regular Status Updates - Keep table statuses current to avoid confusion
  2. Pre-assign Reservations - Assign tables to reservations before guests arrive
  3. Match Capacity - Always assign tables with appropriate seating for party size
  4. Quick Turnover - Update table status to ‘available’ as soon as it’s ready
  5. Monitor Reservations - Check the reservation list frequently during busy periods
  6. Coordinate with Staff - Communicate table assignments with other waiters and kitchen staff

Build docs developers (and LLMs) love