Codexshaper / laravel-woocommerce

WooCommerce Rest API for Laravel
MIT License
189 stars 59 forks source link

List more than the default 10 items when querying #74

Closed leetimeleisure closed 3 years ago

leetimeleisure commented 3 years ago

Hi there,

I hope you're well.

I seem to have having an issue with pagination.

Using the code below, I get 100 rows as expected.

$orders = Order::all(['per_page' => 100]);

However, if I take the following, I can't seem to get it to display more than 10 items no matter how I try it.

$orders = Order::whereBefore('xxxxx')->whereAfter('xxxxx')->get(['per_page' => 100]);
$orders = Order::whereBefore('xxxxx')->whereAfter('xxxxx')->all(['per_page' => 100]);

Using the paginate functions don't seem to work either. The first option returns the correct results, but only 10 of them. The second ignores the filters and returns 100 results.

Could someone provide some insight please?

Many thanks, Lee

leetimeleisure commented 3 years ago

Nevermind, I was misread the docs. There's no technical issue here so I'm closing this.

Lee

Brindafashion commented 1 year ago

How can i implement pagination links of arrived order data in blade ?