P
P
predewill2019-06-26 18:56:44
Laravel
predewill, 2019-06-26 18:56:44

Should I use Eloquent in laravel or write my own classes for entities?

Hello.
I am working on a project, the project will have many tables and relationships between them.
The project consists of several separate services. Each service has its own entities.
For example, in one service in the User entity, there are some fields and functionality, in another service there are others.
Is it worth learning and using Eloquent, or would it be more correct and easier to write your own classes for entities and for repositories?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kafkiansky, 2019-06-26
@mad_maximus

Take Doctrine, you yourself will not normally make entities and repositories.

A
Alex Wells, 2019-06-27
@Alex_Wells

Well, write a common "User" module containing common info from all other modules. If you really want other models in other modules, please do so, inherit from the common User and select only what you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question