In Chapter 3, Your First Application, we learned how to use Eloquent to create models that represent the entities of our applications. We defined simple foreign key relationships and we used basic methods such as
find($id). While these are the methods you will use frequently, Eloquent has a ton of other useful features and we will now look at some of the most useful ones.
Just like with any ORM that issues SQL queries for you, with Eloquent you can sometimes shoot yourself in the foot if you do not understand what it does behind the scene. For this reason, we will start by looking at a couple of things to consider improving the overall performance of your application. ...