Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix desc order in paginate. #285

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Sep 3, 2020

  1. Fix desc order in paginate.

    Order desc was sorting per page, not like real pagination, now it's working with me well.
    MostafaRabia committed Sep 3, 2020
    Configuration menu
    Copy the full SHA
    751fe5c View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2020

  1. Update TNTSearchEngine.php

    That's better, the perv if the paginate 20 and last page has 4 results won't get them.
    MostafaRabia committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    84dea6d View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2020

  1. Faced problem in laravel 8 while order pagination

    There is changes i don't understand it, but it works to me like in charm, get all IDs then order them in paginate, no more "rsort" or something else.
    But i don't understand "keyBy($model->getKeyName())", if my pagination IDs is:
    10
    9
    3
    By "keyBy($model->getKeyName());" turns to:
    3
    9
    10
    
    So i deleted it and the:
    return $models->newCollection($results['ids'])->map(function ($hit) use ($models) {
                if (isset($models[$hit])) {
                    return $models[$hit];
                }
            })->filter()->values();
    too, and it's working now, working too if your pagination not in default name "page".
    MostafaRabia committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    cf3b488 View commit details
    Browse the repository at this point in the history