Skip to content

📦 OrderItems Model Pro ​

The OrderItems model represents individual line items within an Order. Each item can be a booking slot price, a service fee, or a discount.

Attributes ​

AttributeTypeDescription
idbigintPrimary key
order_idbigintParent Order ID
booking_idbigintAssociated Booking ID
item_nametextName of the item (e.g., "Consultation Fee")
typevarcharItem type (e.g., booking_slot, discount, tax)
quantityintNumber of units
item_pricedecimalPrice per unit
item_totaldecimalTotal item price (quantity * item_price)
ratedecimalCurrency conversion rate
line_metatext(Serialized) Additional item metadata
created_attimestampRecord creation time
updated_attimestampRecord last update time

Relations ​

order ​

Returns the parent Order model.

Usage Examples ​

Fetching items for an order ​

php
$order = Order::find(1);
foreach ($order->items as $item) {
    echo $item->item_name . ': ' . $item->item_total;
}