R
R
Roman2019-02-04 16:28:05
CRM
Roman, 2019-02-04 16:28:05

How to correctly link the Laravel table database with third-party CRM tables (in the same database)?

Hello.
1. I am creating a site on Laravel (I am completely new to it) and I need the site to work with initially predefined tables, which will be written by a third-party CRM (its server part).
2. I would like to initially competently enter this interaction into the Laravel ideology, so as not to redo it later.
3. CRM tables have a different naming system, and partly duplicate the "native" Laravel tables. For example, there is `users` in Laravel created with the help of make:auth and there is, say, `CRMUSERS11` of this CRM itself. And some fields with different names intersect in them, that is, they mean essentially the same thing.
4. The CRM developer says to me: - Let me just add fields to `users` and I will write to them from CRM. And I tell him that this is not the best idea, and it is best to make an additional one. a plate where there will be a correspondence between id `users` and `CRMUSERS11`.
Or is it easier to add field to `users` itself, with ID from `CRMUSERS11`? How is it correct?
5. Here is the question: how to create models for such tables like `CRMUSERS11`?
6. A CRM developer wants to be able to create users in `users` from CRM - should he be allowed to do this? And how then to generate a hash of the password?
In general, a bunch of questions of this kind - if someone has come across a similar one and shares their experience, it will be great.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2019-02-04
@Maksclub

https://laravel.com/docs/5.7/database#read-and-wri...
in the example, the last point is prefix
https://github.com/laravel/laravel/blob/master/con...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question