Closed HellPat closed 11 years ago
I believe that was on purpose - saving an array of Eloquent objects instead of the Collection object. However, I'll check it out! I'm going to be reviewing feedback this weekend.
Thank!
Oh sorry... by bad: Page 37 L 93
is the one that seems wrong to me.
$
Symbol missing, too.
Thanks!
I fixed the missing $
. However, setting the items to $articles->all()
is on purpose - I with to save the array of Eloquent models, rather than the pagination item itself. This is both because I don't want Laravel's Pagination object to be an implicit dependency of the repository and because (later as seen in the cacheing chapter), there are issues with cacheing the Pagination object as it contains a Closure
.
Thanks again for your help improving the book!
Page 36 in PDF prepares the statement for a paginated result but instead it returns $articles->all(); in the StdClass.
Seems to be wrong?!