Support the ongoing development of Laravel.io →
posted 1 year ago
Laravel
Last updated by @tsy-0730 1 year ago.
0

You need to call ->paginate() on your DB query or Eloquent Query https://laravel.com/docs/10.x/pagination

Last updated 1 year ago.
0

You should call paginate method to retrieve the records from your route handler or controller.

For example in your controller you are retriving the $inventory data like this:

$inventory = Inventory::all();

or

$inventory = Inventory::query()->get();

This should be changed to something like this:

$inventory = Inventory::query()->paginate();

You will get the access to the links method only if you are fetching data using paginate or simplePaginate method.

See more details here: https://laravel.com/docs/10.x/pagination#paginating-eloquent-results

How are you retrieving the data for the $inventory variable?

Last updated 1 year ago.
0

Your database query or Eloquent Query needs to be paginated; see https://laravel.com/docs/10.x/pagination

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Yang tsy-0730 Joined 17 Apr 2023

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.