We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@taylorotwell LengthAwarePaginator should use custom model collection from newCollection not Collection, even if query result is empty.
from docs
from to
$results = $this->forPage($page, $perPage)->get($columns);
instead of
$results = $total ? $this->forPage($page, $perPage)->get($columns) : new Collection;
in
The text was updated successfully, but these errors were encountered:
Makes sense to transmit the same class, whether results are empty or not.
If you want to keep the optimization from #14188:
$results = $total ? $this->forPage($page, $perPage)->get($columns) : $this->model->newCollection();
Sorry, something went wrong.
We're open to PRs. :)
Submitted #16547.
Though may I suggest to close issues after a PR has been opened? If an issue is worth fixing but is closed, it's easy to forget about it…
No branches or pull requests
Description:
@taylorotwell LengthAwarePaginator should use custom model collection from newCollection not Collection, even if query result is empty.
from docs
from
to
Steps To Reproduce:
instead of
in
The text was updated successfully, but these errors were encountered: