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
8
S
18
M
26
L
22
XL
8
Total 22 18 27 15 82