If you are just using Laravel, just Lazy Load, and then you can Lazy Load on a request. Check out this article, it may explain it better.
https://medium.com/@kouipheng.lee/laravel-eloquent-lazy-vs-eager-loaded-803852c59e1c
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hi all,
just a best practice question.
I work on a CRM where basically I have an application that has to go through multiple stages (6) at the moment. At each stage, a new relationship is updated/created (choose a course, upload documents, etc.). Would it be better to lazy load and refer to the relationships e.g. $application->student->first_name or better would be to eager load the whole application (using the with('student', 'documents')) and refer to the fields as $application['student']['first_name']?
I get the differences but I cannot understand how to use it right and what is the best practice.
Any reply is appreciated, thank you.
Please or to participate in this conversation.