Warp Matrix demo — a row × column input field for Filament: stock by size and color, prices, permissions. Change anything; the data is reset every hour. warpui.com About Warp Matrix Docs Ask a question Support
Skip to content

Edit product

Product

Stock by size and color

The sizes and colors come from the sizes and colors tables (->rows(Size::query()), ->columns(Color::query())). Each filled cell is saved as one row in the stocks table (->relationship('stocks')). ->numeric(min: 0) takes numbers from 0, and ->totals() adds a total for each size and each color.

Note: Try it

Change M × Black to 25: the totals on the right and at the bottom change as you type. Click “Save changes”, then reload the page: 25 is still there. Empty a cell and save to delete its row.

Stock by size and color
Size
Black
White
Navy
Olive
Total
XS
11
S
39
M
61
L
44
XL
7
Total 55 52 33 22 162