A
A
Alexey Vesnin2019-12-09 14:13:41
Database design
Alexey Vesnin, 2019-12-09 14:13:41

How to organize links in the directory?

Hello. I am writing a project on Laravel
How can I make a catalog of the following type so as not to produce brands nested in categories and in each category types of equipment and models) For the time being, it is the catalog that is of interest, not the filter:
I have:
1. Auto parts (Linking to categories, brands, Types of equipment)
2. Categories of spare parts
3. Brands (manufacturers of special equipment - KOMATSU, CATERPILLAR, etc.)
4. Types of equipment (excavators, bulldozers, etc.)
5. The equipment itself (For example, KOMATSU PW160-7E0 excavator, CATERPILLAR bulldozer D6R)
An example of what I need:
Brand of special equipment > Type of equipment > The equipment itself - models (optional) > Categories of spare parts > Show spare parts (of a certain brand, type of equipment, model (optional), certain categories of spare parts
---------------- ----------------
An important point, my site sells both the spare parts for special equipment and the equipment itself.
Brands and types of equipment are used for spare parts and the equipment itself.
How to organize everything " according to your mind"? Approximately what you need: https://www.udt-technika.ru/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2019-12-09
@Fragster

Make the catalog structure virtual (computable) based on fields (calculate subcategories as select distinct nextfield from items where currentfield = 'current category' and previousfield = 'parent category'...) The query is, of course, approximate, but the train of thought should be clear .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question