sdr1989 - 2 weeks ago

Hi everyone, I have a model MyModel width some translatable field, I paginate the rows in the controller like this:

$result = MyModel::where('status', '=', 1)->orderBy('date', 'DESC')->paginate();

Let's just say that my view is:

{% for anItem in result %}

{{ anItem.image.make().fit(400, 300)|raw }}

{{ anItem.name }}

{% endfor %}

Every page has 15 items, after five or six pages the data starts to get mixed (the more the page number goes on and the worse it gets) and I have no idea why since from the backend and the db everythings looks fine, so what it happens is that I have the slug and the Image of one post and the name of another one...

Does this have ever happen to someone else? Is there a solutions? Thanks a lot!