Open JN-Jones opened 9 years ago
Laravel caches (as always) nothing, so the following code will run the same query three times:
$forum = Forum::find(1); $forum->parent; $forum->parent; $forum->parent;
while the following code will do the same but run the query only once:
$forum = Forum::find(1); Forum::find($forum->parent_id); Forum::find($forum->parent_id); Forum::find($forum->parent_id);
Moving this to Beta 1 milestone, not essential for Alpha releases as it's an optimisation.
Laravel caches (as always) nothing, so the following code will run the same query three times:
while the following code will do the same but run the query only once: