TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/OswalSnow/AR-Barber/llms.txt
Use this file to discover all available pages before exploring further.
Service model represents a named barbershop service with an associated duration in minutes. Services are linked to appointments through a many-to-many relationship using the appointment_service pivot table. The model is available for a full service catalogue workflow, though the current booking flow uses a simpler servicio string field on the Appointment model directly.
Fields
Auto-incrementing primary key.
Human-readable service name, for example
'Corte de cabello' or 'Arreglo de barba'.How long the service takes, in minutes. Used to calculate the
ends_at timestamp on an appointment when services are attached via the pivot relation.Timestamp set automatically when the record is created.
Timestamp updated automatically on every save.
Relations
appointments() — belongsToMany Appointment
Services are linked to appointments through the appointment_service pivot table.
| Column | Type | Description |
|---|---|---|
appointment_id | integer | Foreign key → appointments.id |
service_id | integer | Foreign key → services.id |
Implicit service types
The current booking form does not createService records at runtime. Instead, the servicio string field on Appointment encodes the service type directly. The three implicit types and their durations are:
servicio value | Label | Duration |
|---|---|---|
corte | Haircut | 30 minutes |
barba | Beard trim | 30 minutes |
ambos | Haircut + beard trim | 60 minutes |
The
Service model and appointment_service pivot table are available for future use. If you extend the app with a dynamic service catalogue (custom pricing, per-barber services, etc.), populate the services table and update the booking flow to use $appointment->services()->attach() rather than the servicio enum string.