Orders resource (/admin/orders)¶
Read-only view of App\Models\Order — orders synced from external e-commerce platforms via system connections. Records are created and updated by the sync pipeline; this resource only exposes them for inspection.
Model attributes¶
| Attribute | Type | Notes |
|---|---|---|
id |
UUID | Primary key via HasUuids |
system_connection_id |
UUID (FK) | Owning SystemConnection |
customer_id |
UUID (FK), nullable | Resolved Customer record |
source_id |
string | ID on the originating platform |
source_order_number |
string, nullable | Human-readable order number from the platform |
source_system |
SystemDriver |
Enum: the platform driver |
customer_source_id |
string, nullable | Customer ID as recorded on the source platform |
status |
string | Order status string from the platform |
currency |
string | ISO 4217 currency code |
total |
integer | Order total in minor currency units (cents) |
total_tax |
integer, nullable | Tax portion in cents |
total_shipping |
integer, nullable | Shipping portion in cents |
address_billing |
array, nullable | Key-value billing address; cast from JSON |
address_shipping |
array, nullable | Key-value shipping address; cast from JSON |
tags |
array | Cast from JSON |
date_paid |
datetime, nullable | When the order was paid |
external_data |
array | Raw platform payload; cast from JSON |
last_bulk_sync_batch_id |
UUID (FK), nullable | Most recent SyncBatch that touched this record |
deleted_at |
timestamp | Soft deletes enabled |
List view columns¶
| Column | Source | Behaviour |
|---|---|---|
| ID | orders.id |
Truncated to 8 chars; full UUID shown on hover; searchable |
| Source Order Number | orders.source_order_number |
Searchable; — when null |
| Source System | orders.source_system |
Badge |
| Status | orders.status |
Badge |
| Currency | orders.currency |
|
| Total | orders.total |
Cents ÷ 100, formatted to 2 d.p.; sortable |
| Date Paid | orders.date_paid |
Date-time; sortable; — when null |
| Created At | orders.created_at |
Date-time; sortable; hidden by default |
Filters: System Connection (relationship, searchable), Source System (enum).
Row action: View — navigates to the detail page.
Detail view¶
The detail page is divided into sections.
Order section¶
| Field | Source | Notes |
|---|---|---|
| Order Number | orders.source_order_number |
— when null |
| Status | orders.status |
Badge |
| Currency | orders.currency |
|
| Date Paid | orders.date_paid |
Date-time; — when null |
| Total | orders.total |
Cents ÷ 100, 2 d.p. |
| Tax | orders.total_tax |
Cents ÷ 100, 2 d.p.; — when null |
| Shipping | orders.total_shipping |
Cents ÷ 100, 2 d.p.; — when null |
| Tags | orders.tags |
Badges, comma-separated; — when empty |
Billing Address section¶
Displays orders.address_billing as a block of Key: value lines. Empty address renders —.
Shipping Address section¶
Displays orders.address_shipping as a block of Key: value lines. Empty address renders —.
Customer section¶
| Field | Source | Notes |
|---|---|---|
customer.email |
Resolved from the customer relationship; — when null |
|
| Customer Source ID | orders.customer_source_id |
Platform-native customer identifier; — when null |
Source section¶
| Field | Source | Notes |
|---|---|---|
| Source System | orders.source_system |
Badge |
| Source ID | orders.source_id |
|
| System Connection | systemConnection.external_user_id |
Timestamps section¶
| Field | Source |
|---|---|
| Created At | orders.created_at |
| Updated At | orders.updated_at |
Line items relation manager¶
The detail page includes a Line Items tab that lists the individual products within the order via Order::lineItems() (HasMany to App\Models\LineItem). The relation manager is read-only.
| Column | Source | Behaviour |
|---|---|---|
| Name | line_items.name |
Searchable |
| SKU | line_items.sku |
— when null |
| Quantity | line_items.quantity |
Numeric; sortable |
| Unit Price | line_items.unit_price |
Cents ÷ 100, 2 d.p.; sortable |
| Total | line_items.total |
Cents ÷ 100, 2 d.p.; sortable |
| Currency | line_items.currency |
— when null |
Access scoping¶
OrderResource::getEloquentQuery() limits results to orders belonging to system connections accessible to the authenticated user, via SystemConnection::accessibleBy($user). SuperAdmins see all records; PlatformSupport and Viewer users see the records of every connection under a tenant they reach, sibling connections included — record visibility follows tenant reach, not the full-versus-status-only split that governs actions on the connection itself.
Direct URL navigation to an out-of-scope record returns a 404 — getRecordRouteBindingEloquentQuery() strips SoftDeletingScope but still applies the accessibility filter.
Source files¶
| File | Purpose |
|---|---|
app/Filament/Resources/Orders/OrderResource.php |
Resource definition, query scoping |
app/Filament/Resources/Orders/Tables/OrdersTable.php |
Table columns, filters, record action |
app/Filament/Resources/Orders/Schemas/OrderView.php |
Detail view infolist with address formatting |
app/Filament/Resources/Orders/RelationManagers/LineItemsRelationManager.php |
Line items tab (read-only) |
app/Filament/Resources/Orders/Pages/ListOrders.php |
List page |
app/Filament/Resources/Orders/Pages/ViewOrder.php |
Detail page |
See also¶
- Customers resource — linked from the Customer section of the order detail view
- System Connections resource — stats widget links to this resource pre-filtered by connection
- Roles & Permissions — access scoping model