M
M
maks789452021-03-20 01:22:43
Laravel
maks78945, 2021-03-20 01:22:43

What are the solutions for separating user data?

Good day, tell me there is a system implemented on laravel 8, in which you can register users, create customers, products and orders for them.
Are there ready-made solutions for sharing data between different companies, for example, there is one company, it can register any number of users, goods, customers and orders. And each company has its own set of data that they themselves fill out.
As I understand it, there should be a company table, In which there should be company_id, name. And all other tables should have a company_id column and display data only for the company to which the user belongs.
But I do not like the probability of id in adjacent tables, since in one company the data will go out of order, for example, there may be a product with id 1,2,3,45,46, etc. And it somehow will not look aesthetically pleasing.
Thank you for your time

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Medvedev, 2021-03-20
@maks78945

There is.
https://github.com/spatie/laravel-multitenancy
https://github.com/stancl/tenancy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question