Answer the question
In order to leave comments, you need to log in
How to programmatically generate tables, models and relationships between them in laravel?
For example, there is a regular online store, the Category and Product model (Categories, Products tables)
In Product - products are stored in Category are categories. Communication is admissible 1-1.
You need to make it possible to programmatically add more directories.
There is a lot of data, more than 500,000 products in each catalog. and for example, there is a directory "Building materials" and you need to add a directory "Household appliances" - each directory should have a table Categories, Products.
The bottom line is not to store all the data in one table, there are a lot of them. How is this done correctly?
How then through api to access models and use normal eloquent to work with tables?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question