Skip to content

Products resource (/admin/products)

Read-only view of App\Models\Product — products 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
source_id string ID on the originating platform
source_custom_id string, nullable Secondary platform identifier
source_system SystemDriver Enum: the platform driver (e.g. woocommerce)
name string Product display name
description string, nullable Long-form product description
url string, nullable URL on the source platform
image_url string, nullable Primary image URL
status ProductStatus Enum: active, inactive, draft (values vary by platform)
sku string, nullable Stock-keeping unit
price integer, nullable Sale price in minor currency units (cents)
original_price integer, nullable List price before discounts, in cents
currency string, nullable ISO 4217 currency code
brand_name string, nullable
target_group string, nullable Platform-specific audience field
categories array Cast from JSON
tags array Cast from JSON
orders_count integer Number of orders containing this product
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 products.id Truncated to 8 chars; full UUID shown on hover; searchable
Name products.name Searchable; truncated at 40 chars
Source System products.source_system Badge
Status products.status Badge
SKU products.sku Searchable; when null
Price products.price Cents divided by 100, formatted to 2 decimal places; sortable
Currency products.currency when null
Orders Count products.orders_count Numeric; sortable
Created At products.created_at Date-time; sortable; hidden by default

Filters: System Connection (relationship, searchable), Source System (enum), Status (enum).

Row action: View — navigates to the detail page.

Detail view fields

Fields are displayed as a flat infolist (no section grouping).

Field Source Notes
Name products.name
Source System products.source_system Badge
Status products.status Badge
Source ID products.source_id
SKU products.sku when null
Price products.price Cents ÷ 100, 2 d.p.; when null
Original Price products.original_price Cents ÷ 100, 2 d.p.; when null
Currency products.currency when null
Brand Name products.brand_name when null
Description products.description when null
URL products.url when null
Orders Count products.orders_count Numeric
System Connection systemConnection.external_user_id
Created At products.created_at Date-time
Updated At products.updated_at Date-time

Access scoping

ProductResource::getEloquentQuery() limits results to products 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/Products/ProductResource.php Resource definition, query scoping
app/Filament/Resources/Products/Tables/ProductsTable.php Table columns, filters, record action
app/Filament/Resources/Products/Schemas/ProductView.php Detail view infolist
app/Filament/Resources/Products/Pages/ListProducts.php List page
app/Filament/Resources/Products/Pages/ViewProduct.php Detail page

See also