jeudi 25 octobre 2018

Paginate() function is returning all the data in Laravel

$products = $this->productRepository->paginate(1);

I want to get only one item at a time but the paginate() function related to pagination are not working. My laravel version is 5.7.6. when i use dd($products) it returns:

Collection {#468 
  #items: array:2 [
    0 => Product {#469}
    1 => Product {#470}
  ]
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire