Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kiwi0134's avatar

Series where a Shop Inventory Stock management has been built

Hello,

I'm trying to find a series I once started watching. Unfortunately it is not in my library here. It might have been a single episode in a series, but it contained the following:

Building a shop inventory where all sales and incoming deliveries are tracked in a table. A product can have different properties like the size. The available amount of products in stock was calculated by that table.

Does anyone know this series / episode? I'm pretty confident that it was here on Laracasts, but I don't remember the episode name or the series and it seems like that I don't find the proper tags to find it via the site search.

Thank you really much.

0 likes
1 reply
martinbean's avatar

@kiwi0134 I’m not familiar with the episode/series you’re talking about, but have worked on plenty of e-commerce-type projects in the past.

Usually, I have a Product model that represents the common characteristics of a product, such as a T-shirt. I’ll then have a Sku model that represents a SKU, which is a single variant of any one product. If a T-shirt comes in different sizes, then you’ll usually have a SKU for each different size.

So when it comes to tracking inventory, you’ll want to track inventory against SKUs rather than products. How “deep” you go with this modelling depends on your requirements. If you need to track incoming deliveries from suppliers, then you may also need to track inventory against locations (i.e. warehouse, shop floor) so you can see just how many size L t-shirts you have in the warehouse, how many are on a shelf in your store, etc. When a delivery comes in, you increase the inventory in your warehouse. When a box is opened and put out on display, you transfer the inventory by deducting the number from warehouse and adding to the number on the shop floor. When a shirt is sold, you decrease the inventory from the shop floor.

Please or to participate in this conversation.