Answer the question
In order to leave comments, you need to log in
At what stage of project growth do you have to use Raw requests?
The project has grown. Now the speed of obtaining different samples is required. Started using direct database queries.
I want to clarify - is this considered bad practice in Laravel or is it allowed? It's just that if you need to link different tables and get a lot of data, then there is a feeling that with the help of eloquent this is done more slowly.
Can you share your experience?
Answer the question
In order to leave comments, you need to log in
I don’t use it at all on some projects, I just drive heavy selections into the cache in advance.
on others - generally from the start. because there is a lot of raw data that is updated every day, and it makes no sense or need to shove them into models (the data is only read).
in the third - where there are not enough opportunities and you need to be cunning.
in general: it all depends, there is no universal answer.
well, it’s worth separately deciding what is meant by raw requests: a query builder or direct access to the database. The last one I almost never use.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question