Owner: Dev Team | Last Updated: 2026-02-21 | Status: Current
Managing the customer database, order history, and Stripe integration.
A Customer is a client who has made at least one purchase. The model supports soft delete and Stripe Customer integration.
| Field | Type | Description |
|---|---|---|
name |
string | First name |
surname |
string | Last name |
phone |
string | Phone |
email |
string | |
coupon_code |
string | Used coupon |
coupon_applied |
boolean | Coupon applied |
coupon_adjustment |
decimal | Discount amount |
gift_card_payment |
decimal | Gift card payment |
last_purchase_date |
datetime | Last purchase date |
is_newsletter |
boolean | Newsletter subscription |
stripe_customer_id |
string | Stripe Customer ID |
payment_method_id |
string | Stripe Payment Method |
Note: The model uses
SoftDeletes-- deleted customers are retained in the database with adeleted_attimestamp.
Full customer interaction history:
| Field | Type | Description |
|---|---|---|
customer_id |
integer | Customer |
experience_id |
integer | Experience |
type |
string | Record type (enum: CustomerHistoryType) |
details |
text | Details |
metadata |
json | Metadata |
order_id |
integer | Link to order |
history |
json | Additional history |
Customer types for segmentation:
| Field | Type | Description |
|---|---|---|
name |
string | Type name |
Caching: CustomerTypeCacheForgetAction
On the first booking, the system creates a Stripe Customer:
StripeService::getOrCreateStripeCustomerByEmail($email)
This enables:
| File | Purpose |
|---|---|
app/Models/Customer.php |
Customer model |
app/Models/CustomerHistory.php |
History |
app/Models/CustomerType.php |
Customer types |
app/Services/CustomerService.php |
Business logic |
app/Http/Controllers/Web/CustomerController.php |
Controller |
resources/js/pages/customers/ |
Frontend pages |
| Date | Author | Change |
|---|---|---|
| 2026-02-21 | Documentation Team | Initial creation |
Up: Guides